From 590b35fb19e031e37dee340d09e0802fcd3a97a1 Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Wed, 22 May 2024 00:45:29 -0400 Subject: Add check for counts and counts.termMeta (#984) --- ext/js/pages/settings/sort-frequency-dictionary-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/pages/settings') diff --git a/ext/js/pages/settings/sort-frequency-dictionary-controller.js b/ext/js/pages/settings/sort-frequency-dictionary-controller.js index 774c3e35..6be24eeb 100644 --- a/ext/js/pages/settings/sort-frequency-dictionary-controller.js +++ b/ext/js/pages/settings/sort-frequency-dictionary-controller.js @@ -107,7 +107,7 @@ export class SortFrequencyDictionaryController { option.textContent = 'None'; fragment.appendChild(option); for (const {title, counts} of dictionaries) { - if (counts.termMeta.freq > 0) { + if (counts && counts.termMeta && counts.termMeta.freq > 0) { option = document.createElement('option'); option.value = title; option.textContent = title; -- cgit v1.2.3