Fix wrong routing state on initial page load

This commit is contained in:
FinnStutzenstein 2019-09-12 15:06:04 +02:00 committed by Emanuel Schütze
parent 02c745ed75
commit 875fc3aae0

View File

@ -98,7 +98,12 @@ export class OpenSlidesService {
if (!this.redirectUrl || !this.redirectUrl.includes('/login/')) {
// Goto login, if the user isn't on a subpage like
// legal notice or reset passwort view.
// If other routing requests are active (e.g. to `/` or `/error`)
// wait for the authguard to finish to navigate to /login. This
// redirect is more important than the other ones.
setTimeout(() => {
this.router.navigate(['/login']);
});
}
}