From aaee86e276accbdab73a3246ad8978c958c61dcf Mon Sep 17 00:00:00 2001 From: ThibG Date: Sat, 22 Feb 2020 01:27:34 +0100 Subject: [PATCH] [Glitch] Fix `/web` redirecting to `/web/web` in web UI Port 13c00dc42ce821070f794648fed5ec9b5b61f1f1 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/util/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/util/main.js b/app/javascript/flavours/glitch/util/main.js index b76826481a..1fdb9ff2b9 100644 --- a/app/javascript/flavours/glitch/util/main.js +++ b/app/javascript/flavours/glitch/util/main.js @@ -12,7 +12,7 @@ function main() { if (window.history && history.replaceState) { const { pathname, search, hash } = window.location; const path = pathname + search + hash; - if (!(/^\/web[$/]/).test(path)) { + if (!(/^\/web($|\/)/).test(path)) { history.replaceState(null, document.title, `/web${path}`); } }