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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-04-22 11:26:34 -04:00
parent 9191533634
commit 6c07b2f438

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