Allow deletion on local settings keys
This commit is contained in:
parent
dcd130fb6c
commit
8f4ff9286a
1 changed files with 9 additions and 1 deletions
|
@ -4,7 +4,15 @@ import type { TitleTheme } from '/@/renderer/types';
|
|||
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue