1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

Revert "Ps/avoid state emit until updated (#7124)" (#7187)

This reverts commit 38c335d8fb.
This commit is contained in:
Matt Gibson
2023-12-12 08:07:42 -05:00
committed by GitHub
parent 79dbe051c8
commit 08b69fffe1
10 changed files with 205 additions and 1126 deletions

View File

@@ -59,7 +59,7 @@ export class FakeStorageService implements AbstractStorageService {
return Promise.resolve(this.store[key] != null);
}
save<T>(key: string, obj: T, options?: StorageOptions): Promise<void> {
this.mock.save(key, obj, options);
this.mock.save(key, options);
this.store[key] = obj;
this.updatesSubject.next({ key: key, updateType: "save" });
return Promise.resolve();

View File

@@ -69,10 +69,6 @@ export function trackEmissions<T>(observable: Observable<T>): T[] {
case "boolean":
emissions.push(value);
break;
case "symbol":
// Cheating types to make symbols work at all
emissions.push(value.toString() as T);
break;
default: {
emissions.push(clone(value));
}
@@ -89,7 +85,7 @@ function clone(value: any): any {
}
}
export async function awaitAsync(ms = 1) {
export async function awaitAsync(ms = 0) {
if (ms < 1) {
await Promise.resolve();
} else {