Skip to content

Commit

Permalink
chore: fix reset to saved or factory settings
Browse files Browse the repository at this point in the history
  • Loading branch information
basilgood committed Sep 24, 2024
1 parent 32ed217 commit 71a4b23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/settings/drivers/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default ({ prefix = '', get$, post$ } = {}) => {
}
};
return {
write: async (settingsId, settings) => {
write: async (settingsId, settings = {}) => {

Check warning on line 11 in lib/settings/drivers/remote.js

View check run for this annotation

Codecov / codecov/patch

lib/settings/drivers/remote.js#L11

Added line #L11 was not covered by tests
const key = prefix + settingsId;
try {
await post$(key, settings);
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/use-saved-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default (settingsId, settings, setSettings, onReset) => {
}
onReset?.();
},
[onReset]
[onReset],
),
hasChanges: settings != null,
};
Expand Down

0 comments on commit 71a4b23

Please sign in to comment.