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 authored and GitHub committed 2021-04-22 12:01:16 -04:00
1 parent 9191533634
commit 7132bf3834
1 file changed
+1 -1
+1 -1
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);
}
}