diff --git a/src/models/login.js b/src/models/login.js index d38465d03d435e119592c4dce2ad5b92855ab859..fffc5197983624c6ddc13ea79e0983d17ff0bbda 100644 --- a/src/models/login.js +++ b/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;