fix: use absolute /version.json path to work on all page depths

The old logic only handled en='version.json' and non-en='../version.json',
which broke on /alternatives/ and /de/alternatives/ pages.
Absolute path works for root, /de/, /alternatives/, /de/alternatives/ etc.
This commit is contained in:
KoalaDev
2026-06-25 04:29:24 +02:00
parent 4aa6f6d7a6
commit 68027a21d5
+1 -1
View File
@@ -331,7 +331,7 @@ document.addEventListener('DOMContentLoaded', () => {
const updateDynamicVersion = async () => {
try {
const versionPath = document.documentElement.lang === 'en' ? 'version.json' : '../version.json';
const versionPath = '/version.json';
const response = await fetch(versionPath);
if (!response.ok) return;
const data = await response.json();