From a9fe2d03b22a0dd5760019f1325a7a86ebb07b85 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 3 Apr 2021 13:02:49 -0400 Subject: Update dictionary settings structure (#1587) * Update dictionary settings structure to use an array instead of an object * Update ensureDictionarySettings implementation * Remove some usage of ObjectPropertyAccessor --- ext/js/display/element-overflow-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/display') diff --git a/ext/js/display/element-overflow-controller.js b/ext/js/display/element-overflow-controller.js index ccea1417..abbf3332 100644 --- a/ext/js/display/element-overflow-controller.js +++ b/ext/js/display/element-overflow-controller.js @@ -29,7 +29,7 @@ class ElementOverflowController { setOptions(options) { this._dictionaries.clear(); - for (const [dictionary, {definitionsCollapsible}] of Object.entries(options.dictionaries)) { + for (const {name, definitionsCollapsible} of options.dictionaries) { let collapsible = false; let collapsed = false; switch (definitionsCollapsible) { @@ -42,7 +42,7 @@ class ElementOverflowController { break; } if (!collapsible) { continue; } - this._dictionaries.set(dictionary, {collapsed}); + this._dictionaries.set(name, {collapsed}); } } -- cgit v1.2.3