1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-25 10:25:36 +02:00

Use unique port names for derived states (#8937)

This commit is contained in:
Matt Gibson 2024-04-26 11:21:42 -04:00 committed by GitHub
parent 67280f48dd
commit 4c1c09f07f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,12 @@ export class ForegroundDerivedStateProvider extends DefaultDerivedStateProvider
_dependencies: TDeps,
storageLocation: [string, AbstractStorageService & ObservableStorageService],
): DerivedState<TTo> {
const [cacheKey, storageService] = storageLocation;
return new ForegroundDerivedState(deriveDefinition, storageService, cacheKey, this.ngZone);
const [location, storageService] = storageLocation;
return new ForegroundDerivedState(
deriveDefinition,
storageService,
deriveDefinition.buildCacheKey(location),
this.ngZone,
);
}
}