fix: fix setPartial

This commit is contained in:
JellyBrick
2023-11-11 11:50:02 +09:00
parent 5cd1d9abe8
commit 7fa8a454b6
5 changed files with 25 additions and 46 deletions

View File

@ -1,17 +1,20 @@
import Store from 'electron-store';
import { deepmerge as createDeepmerge } from '@fastify/deepmerge';
import defaultConfig from './defaults';
import plugins from './plugins';
import store from './store';
import { restart } from '../providers/app-controls';
const deepmerge = createDeepmerge();
const set = (key: string, value: unknown) => {
store.set(key, value);
};
const setPartial = (value: object) => {
// deepmerge(store.get, value);
const setPartial = (key: string, value: object) => {
deepmerge(store.get(key), value);
store.set(value);
};