1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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