Fixed errors on login

This commit is contained in:
FinnStutzenstein 2019-03-15 15:29:02 +01:00
parent ccc81df434
commit cd7b700aea

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']);