فهرست منبع

fix bug by logout cause path exception (#2865)

Soap 7 سال پیش
والد
کامیت
f9004b6301
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  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;