diff options
-rw-r--r-- | ext/bg/js/database.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 453cf15f..db59f982 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -153,11 +153,11 @@ class Database { this._validate(); const promises = []; - const visited = {}; + const visited = new Set(); const results = []; const processRow = (row, index) => { - if (titles.includes(row.dictionary) && !hasOwn(visited, row.id)) { - visited[row.id] = true; + if (titles.includes(row.dictionary) && !visited.has(row.id)) { + visited.add(row.id); results.push(Database._createTerm(row, index)); } }; |