From 692a81e91fdce2127695b22c913c646405a1c498 Mon Sep 17 00:00:00 2001 From: basilgood Date: Tue, 24 Sep 2024 12:00:22 +0300 Subject: [PATCH] fix: reset to saved or factory settings --- lib/settings/drivers/remote.js | 2 +- lib/settings/use-saved-settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/settings/drivers/remote.js b/lib/settings/drivers/remote.js index 2e8c0612..9ddeb897 100644 --- a/lib/settings/drivers/remote.js +++ b/lib/settings/drivers/remote.js @@ -8,7 +8,7 @@ export default ({ prefix = '', get$, post$ } = {}) => { } }; return { - write: async (settingsId, settings) => { + write: async (settingsId, settings = {}) => { const key = prefix + settingsId; try { await post$(key, settings); diff --git a/lib/settings/use-saved-settings.js b/lib/settings/use-saved-settings.js index e522aec4..1b126a31 100644 --- a/lib/settings/use-saved-settings.js +++ b/lib/settings/use-saved-settings.js @@ -37,7 +37,7 @@ export default (settingsId, settings, setSettings, onReset) => { } onReset?.(); }, - [onReset] + [onReset], ), hasChanges: settings != null, };