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

View File

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