From d5318055974cdbf159c2b79aa76c9328fc67daeb Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:51:00 -0800 Subject: [PATCH] fix base redirect --- docs/_templates/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index c7c9f37db..89355b774 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -25,9 +25,9 @@ "changelog.html": "changelog", } - const path = RTD_TO_MKD[window.location.pathname.substring(window.location.pathname.lastIndexOf("/") + 1)] + "/"; + const path = (RTD_TO_MKD[window.location.pathname.substring(window.location.pathname.lastIndexOf("/") + 1)] ?? "") + "/"; const hash = window.location.hash; - const redirectURL = new URL(path + hash, "https://paperless-ngx.com/"); + const redirectURL = new URL(path + hash, "https://paperless-ngx.com/"); console.log(`Redirecting to ${redirectURL} in 3 seconds...`); setTimeout(() => {