diff --git a/assets/js/versions.template.js b/assets/js/versions.template.js index 79fcbc8d..b45b346e 100644 --- a/assets/js/versions.template.js +++ b/assets/js/versions.template.js @@ -82,7 +82,14 @@ function appendVersion(parent, name, url) { a.appendChild(text); } -fetch("/latest/versions.json") +// If we're in the unstable version, we're the latest thing and can just load +// versions.json from our own resources. Otherwise, we fall back to loading it +// from /unstable/versions.json, assuming we are on the spec.matrix.org deployment. +const url = currentVersion === "unstable" + ? '{{ "/" | relURL }}versions.json' + : "/unstable/versions.json"; + +fetch(url) .then(r => r.json()) .then(versions => { // Find the surrounding list element diff --git a/changelogs/internal/newsfragments/2258.clarification b/changelogs/internal/newsfragments/2258.clarification new file mode 100644 index 00000000..468f55d5 --- /dev/null +++ b/changelogs/internal/newsfragments/2258.clarification @@ -0,0 +1 @@ +Add version picker in the navbar.