1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix cleanup in createStorage racing the creation of ClusterStore (#2595)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-04-22 12:01:16 -04:00 committed by GitHub
parent 9191533634
commit 7132bf3834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export function createStorage<T>(key: string, defaultValue: T, observableOptions
// remove json-file when cluster deleted
if (clusterId !== undefined) {
when(() => ClusterStore.getInstance().removedClusters.has(clusterId)).then(removeFile);
when(() => ClusterStore.getInstance(false)?.removedClusters.has(clusterId)).then(removeFile);
}
}