commit: 9fe2d4f1007bff03c28c5bed5e883ea4d41e0b99
parent: 86598d0fa383616f72640327f681ffca6dcb0ba6
Author: Morgan Bazalgette <the@howl.moe>
Date: Thu, 29 Mar 2018 23:47:13 +0200
Fix going to /web and getting redirected to /web/web
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/javascript/mastodon/main.js b/app/javascript/mastodon/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}`);
}
}