From d9d7f3d61aeac3e9cf8f274516481f6eaedda0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20R=C3=BCtter?= Date: Fri, 5 Apr 2024 11:53:06 +0200 Subject: [PATCH] Load the version as selected in the dropdown, support current --- scripts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.js b/scripts/main.js index 76c3a1d..d85b2e9 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -36,7 +36,7 @@ if (hostname) { } else { // use version as specified in the version dropdown let selectedVersion = versionSelect.value; - if (selectedVersion === "openapi_latest"){ + if (selectedVersion === "openapi_latest" || version === "current"){ rapidoc.setAttribute("spec-url", `./definitions/openapi_latest.json`); } else { rapidoc.setAttribute("spec-url", `./definitions/${selectedVersion}.json`);