summaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 2ecd5527..312c6efc 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -1115,8 +1115,10 @@ export class OptionsUtil {
*/
_updateVersion23(options) {
for (const {options: profileOptions} of options.profiles) {
- for (const dictionary of profileOptions.dictionaries) {
- dictionary.partsOfSpeechFilter = true;
+ if (Array.isArray(profileOptions.dictionaries)) {
+ for (const dictionary of profileOptions.dictionaries) {
+ dictionary.partsOfSpeechFilter = true;
+ }
}
}
}
@@ -1129,8 +1131,10 @@ export class OptionsUtil {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v24.handlebars');
for (const {options: profileOptions} of options.profiles) {
- for (const dictionary of profileOptions.dictionaries) {
- dictionary.useDeinflections = true;
+ if (Array.isArray(profileOptions.dictionaries)) {
+ for (const dictionary of profileOptions.dictionaries) {
+ dictionary.useDeinflections = true;
+ }
}
}
}