1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

u2d lib is externals

This commit is contained in:
Kyle Spearrin
2018-06-27 22:05:33 -04:00
parent bf5d8cab1c
commit 5760efdaa1
4 changed files with 9 additions and 3 deletions

View File

@@ -35,12 +35,13 @@ export class TwoFactorU2fComponent implements OnInit, OnDestroy {
u2fListening: boolean;
u2fResponse: string;
masterPassword: string;
u2fScript: HTMLScriptElement;
authPromise: Promise<any>;
formPromise: Promise<any>;
private masterPasswordHash: string;
private closed = false;
private u2fScript: HTMLScriptElement;
constructor(private apiService: ApiService, private i18nService: I18nService,
private analytics: Angulartics2, private toasterService: ToasterService,
@@ -55,6 +56,7 @@ export class TwoFactorU2fComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
this.closed = true;
window.document.body.removeChild(this.u2fScript);
}
@@ -86,7 +88,7 @@ export class TwoFactorU2fComponent implements OnInit, OnDestroy {
}
private readDevice() {
if (this.enabled) {
if (this.closed || this.enabled) {
return;
}