aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-08-20 11:29:31 -0400
committerGitHub <noreply@github.com>2022-08-20 11:29:31 -0400
commitada4df1971f8fb0a1efc6d094a5c03cc7fdd4d5b (patch)
tree8170f1d848d1da85f643288061d3f22aee5a9e96 /ext/js/data/options-util.js
parent0b1ad403471c0c097d08af59717a34691d8bf5b7 (diff)
Fix invalid default values for popupTheme and popupOuterTheme (#2180)
* Fix invalid default values for popupTheme and popupOuterTheme * Options update
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 8c50493a..d2835adb 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -980,8 +980,17 @@ class OptionsUtil {
_updateVersion20(options) {
// Version 20 changes:
// Added anki.downloadTimeout.
+ // Fixed general.popupTheme invalid default.
+ // Fixed general.popupOuterTheme invalid default.
for (const profile of options.profiles) {
profile.options.anki.downloadTimeout = 0;
+ const {general} = profile.options;
+ if (general.popupTheme === 'default') {
+ general.popupTheme = 'light';
+ }
+ if (general.popupOuterTheme === 'default') {
+ general.popupOuterTheme = 'light';
+ }
}
return options;
}