Merge pull request #4512 from FinnStutzenstein/fixOpenSlidesServiceOnLogin

Fixed errors on login
This commit is contained in:
Emanuel Schütze 2019-03-16 12:11:44 +01:00 committed by GitHub
commit e03ec00567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ export class OpenSlidesService {
* Redirects the user to /login, if he isn't on a subpage.
*/
private redirectToLoginIfNotSubpage(): void {
if (!this.redirectUrl.includes('/login/')) {
if (!this.redirectUrl || !this.redirectUrl.includes('/login/')) {
// Goto login, if the user isn't on a subpage like
// legal notice or reset passwort view.
this.router.navigate(['/login']);