mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Allow deletion on local settings keys
This commit is contained in:
@@ -4,7 +4,15 @@ import type { TitleTheme } from '/@/renderer/types';
|
|||||||
|
|
||||||
const store = new Store();
|
const store = new Store();
|
||||||
|
|
||||||
const set = (property: string, value: string | Record<string, unknown> | boolean | string[]) => {
|
const set = (
|
||||||
|
property: string,
|
||||||
|
value: string | Record<string, unknown> | boolean | string[] | undefined,
|
||||||
|
) => {
|
||||||
|
if (value === undefined) {
|
||||||
|
store.delete(property);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
store.set(`${property}`, value);
|
store.set(`${property}`, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user