remove all instances of first as it can cause an error if it's never triggered

This commit is contained in:
Art Lowel
2018-12-19 14:53:11 +01:00
parent e2a6db3679
commit 9911578bcc
12 changed files with 44 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import { first, map, switchMap } from 'rxjs/operators';
import { first, map, switchMap, take } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@@ -62,7 +62,7 @@ export class ServerAuthService extends AuthService {
*/
public redirectToPreviousUrl() {
this.getRedirectUrl().pipe(
first())
take(1))
.subscribe((redirectUrl) => {
if (isNotEmpty(redirectUrl)) {
// override the route reuse strategy