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

@@ -277,7 +277,7 @@ export class AuthService {
public isTokenExpiring(): Observable<boolean> {
return this.store.pipe(
select(isTokenRefreshing),
first(),
take(1),
map((isRefreshing: boolean) => {
if (this.isTokenExpired() || isRefreshing) {
return false;
@@ -360,7 +360,7 @@ export class AuthService {
*/
public redirectToPreviousUrl() {
this.getRedirectUrl().pipe(
first())
take(1))
.subscribe((redirectUrl) => {
if (isNotEmpty(redirectUrl)) {