Explorar o código

fix bug by logout cause path exception (#2865)

Soap %!s(int64=7) %!d(string=hai) anos
pai
achega
f9004b6301
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/models/login.js

+ 2 - 2
src/models/login.js

@@ -29,8 +29,8 @@ export default {
           const redirectUrlParams = new URL(redirect);
           if (redirectUrlParams.origin === urlParams.origin) {
             redirect = redirect.substr(urlParams.origin.length);
-            if (redirect.startsWith('/#')) {
-              redirect = redirect.substr(2);
+            if (redirect.match(/^\/.*#/)) {
+              redirect = redirect.substr(redirect.indexOf('#')+1);
             }
           } else {
             window.location.href = redirect;