From: ThibG Date: Sat, 22 Feb 2020 00:27:34 +0000 (+0100) Subject: [Glitch] Fix `/web` redirecting to `/web/web` in web UI X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=2f2b48b227304d0f0a28dd4867e84af10b8097ad;p=mastodon.git [Glitch] Fix `/web` redirecting to `/web/web` in web UI Port 0f07218e53bf581127cdcf5fbf12d9c207ace8d7 to glitch-soc Signed-off-by: Thibaut Girka --- diff --git a/app/javascript/flavours/glitch/util/main.js b/app/javascript/flavours/glitch/util/main.js index b76826481..1fdb9ff2b 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}`); } }