]> cat aescling's git repositories - mastodon.git/commitdiff
Fix `/web` redirecting to `/web/web` in web UI (#13128)
authorThibG <thib@sitedethib.com>
Sat, 22 Feb 2020 00:27:34 +0000 (01:27 +0100)
committerGitHub <noreply@github.com>
Sat, 22 Feb 2020 00:27:34 +0000 (01:27 +0100)
Fixes #13127

app/javascript/mastodon/main.js

index 5d73caa1081bea8c30bef54d790d3f6f59d8cd9c..da4884fd3d77644b77ec3cd484b77e24f79344de 100644 (file)
@@ -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}`);
     }
   }