From 32e5d70089e4962d2941ab1bb4a693e84a652387 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Mon, 16 Dec 2024 22:47:25 -0500 Subject: [PATCH] Replace cleanup loop with map --- ext/js/pages/settings/dictionary-controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/js/pages/settings/dictionary-controller.js b/ext/js/pages/settings/dictionary-controller.js index 33bc9d7b7..2d5a942f7 100644 --- a/ext/js/pages/settings/dictionary-controller.js +++ b/ext/js/pages/settings/dictionary-controller.js @@ -832,9 +832,7 @@ export class DictionaryController { const dictionaries = this._dictionaries; if (dictionaries === null) { return; } - for (const entry of this._dictionaryEntries) { - entry.cleanup(); - } + this._dictionaryEntries.map((dictionaryEntry) => dictionaryEntry.cleanup()); const dictionaryOptionsArray = options.dictionaries; for (let i = 0, ii = dictionaryOptionsArray.length; i < ii; ++i) {