fix if no competition
This commit is contained in:
parent
516c7b82d5
commit
bd98d5baaa
5
main.js
5
main.js
@ -958,6 +958,9 @@
|
||||
}
|
||||
|
||||
function addStickyMenu() {
|
||||
let competition = getCompetition()
|
||||
if (!competition) return
|
||||
|
||||
let menuContainer = document.createElement("nav")
|
||||
menuContainer.classList.add("sticky-menu")
|
||||
let menu = document.createElement("menu")
|
||||
@ -973,7 +976,7 @@
|
||||
for (const [label, href] of Object.entries(links)) {
|
||||
let menuItem = document.createElement("li")
|
||||
let link = document.createElement("a")
|
||||
link.href = `/${getCompetition()}/${href}`
|
||||
link.href = `/${competition}/${href}`
|
||||
link.innerText = label
|
||||
|
||||
if (label === "Легенда") {
|
||||
|
Loading…
Reference in New Issue
Block a user