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
1 changed files with 7 additions and 2 deletions

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,
);
}
}