1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

[Refactor] Use rxjs first instead of unsubscribe from queryParams (#1229)

* Use rxjs first instead of unsubscribe

* Use rxjs first instead of unsubscribe

* Update jslib

* Update jslib

* Downgrade jslib to before breaking changes
This commit is contained in:
Thomas Rittson
2021-10-15 08:59:43 +10:00
committed by GitHub
parent 356262975c
commit 98bd41d4b1
17 changed files with 50 additions and 81 deletions

View File

@@ -11,6 +11,8 @@ import {
ToasterService,
} from 'angular2-toaster';
import { first } from 'rxjs/operators';
import { ApiService } from 'jslib-common/abstractions/api.service';
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
@@ -41,12 +43,7 @@ export class SetupComponent implements OnInit {
ngOnInit() {
document.body.classList.remove('layout_frontend');
let fired = false;
this.route.queryParams.subscribe(async qParams => {
if (fired) {
return;
}
fired = true;
this.route.queryParams.pipe(first()).subscribe(async qParams => {
const error = qParams.providerId == null || qParams.email == null || qParams.token == null;
if (error) {