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

Make lifecycle of injectable store work as expected

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-04-13 13:17:40 +03:00 committed by Janne Savolainen
parent 65306cc322
commit 8b3bbc78b8
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A

View File

@ -9,10 +9,13 @@ import { createClusterInjectionToken } from "../cluster/create-cluster-injection
const clusterStoreInjectable = getInjectable({ const clusterStoreInjectable = getInjectable({
id: "cluster-store", id: "cluster-store",
instantiate: (di) => instantiate: (di) => {
ClusterStore.createInstance({ ClusterStore.resetInstance();
return ClusterStore.createInstance({
createCluster: di.inject(createClusterInjectionToken), createCluster: di.inject(createClusterInjectionToken),
}), });
},
causesSideEffects: true, causesSideEffects: true,
}); });