1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

Fix undefined variable error in desktop (#470)

This commit is contained in:
Thomas Rittson
2021-09-01 07:19:16 +10:00
committed by GitHub
parent d3ee08abb6
commit 1c1f080acf

View File

@@ -5,6 +5,8 @@ import {
Router, Router,
} from '@angular/router'; } from '@angular/router';
import { first } from 'rxjs/operators';
import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType'; import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType';
import { TwoFactorEmailRequest } from 'jslib-common/models/request/twoFactorEmailRequest'; import { TwoFactorEmailRequest } from 'jslib-common/models/request/twoFactorEmailRequest';
@@ -65,14 +67,10 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
return; return;
} }
const queryParamsSub = this.route.queryParams.subscribe(async qParams => { this.route.queryParams.pipe(first()).subscribe(qParams => {
if (qParams.identifier != null) { if (qParams.identifier != null) {
this.identifier = qParams.identifier; this.identifier = qParams.identifier;
} }
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
}); });
if (this.needsLock) { if (this.needsLock) {