mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix type error
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
318d7fbe2b
commit
2217b681e9
@ -7,11 +7,7 @@ import userStoreInjectable from "./user-store.injectable";
|
||||
|
||||
const kubeconfigSyncsInjectable = getInjectable({
|
||||
id: "kubeconfig-syncs",
|
||||
instantiate: (di) => {
|
||||
const store = di.inject(userStoreInjectable);
|
||||
|
||||
return store.syncKubeconfigEntries;
|
||||
},
|
||||
instantiate: (di) => di.inject(userStoreInjectable).syncKubeconfigEntries,
|
||||
});
|
||||
|
||||
export default kubeconfigSyncsInjectable;
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { merge } from "lodash";
|
||||
import type { ObservableMap } from "mobx";
|
||||
import { observable } from "mobx";
|
||||
import homeDirectoryPathInjectable from "../os/home-directory-path.injectable";
|
||||
import joinPathsInjectable from "../path/join-paths.injectable";
|
||||
import { defaultThemeId } from "../vars";
|
||||
@ -109,8 +111,8 @@ const userStorePreferenceDescriptorsInjectable = getInjectable({
|
||||
return res.length ? res : undefined;
|
||||
},
|
||||
}),
|
||||
syncKubeconfigEntries: getPreferenceDescriptor<KubeconfigSyncEntry[], Map<string, KubeconfigSyncValue>>({
|
||||
fromStore: val => new Map(
|
||||
syncKubeconfigEntries: getPreferenceDescriptor<KubeconfigSyncEntry[], ObservableMap<string, KubeconfigSyncValue>>({
|
||||
fromStore: val => observable.map(
|
||||
val?.map(({ filePath, ...rest }) => [filePath, rest])
|
||||
?? [[mainKubeFolderPath, {}]],
|
||||
),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user