Skip to content

Commit

Permalink
fix: save options after updating them
Browse files Browse the repository at this point in the history
_optionsUtil.save() is only called in _saveOptions, which is only
called through

- _onApiSetAllSettings
- _onApiModifySettings
- _onCommandToggleTextScanning

it should be safe to simply save settings after updating them.

without saving, the options will be updated every time the background
restarts, until any settings are modified or text scanning is
toggled. for _updateVersion21, this means the welcome page will open
repeatedly to show the same warning.
  • Loading branch information
praschke committed Oct 23, 2023
1 parent c3148c6 commit 7b9f183
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/js/data/options-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class OptionsUtil {

if (typeof options !== 'undefined') {
options = await this.update(options);
await save(options);

Check failure on line 117 in ext/js/data/options-util.js

View workflow job for this annotation

GitHub Actions / test

'save' is not defined
} else {
options = this.getDefault();
}
Expand Down

0 comments on commit 7b9f183

Please sign in to comment.