Allow deletion on local settings keys

This commit is contained in:
jeffvli 2024-02-12 20:50:50 -08:00
parent dcd130fb6c
commit 8f4ff9286a

View file

@ -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);
};