From bd98d5baaa6f43af0846fe12d68d10ccffcf4f75 Mon Sep 17 00:00:00 2001 From: Zhora Shalyapin Date: Mon, 17 Mar 2025 15:12:56 +0000 Subject: [PATCH] fix if no competition --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 62334a9..e713ae6 100644 --- a/main.js +++ b/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 === "Легенда") {