aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/dictionary-data-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/dictionary-data-util.js')
-rw-r--r--ext/mixed/js/dictionary-data-util.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/mixed/js/dictionary-data-util.js b/ext/mixed/js/dictionary-data-util.js
index 72c28172..709f4ead 100644
--- a/ext/mixed/js/dictionary-data-util.js
+++ b/ext/mixed/js/dictionary-data-util.js
@@ -17,16 +17,13 @@
class DictionaryDataUtil {
static getPitchAccentInfos(definition) {
- if (typeof definition.character === 'string') {
- // Kanji
- return [];
- }
+ const {type} = definition;
+ if (type === 'kanji') { return []; }
const results = new Map();
const allExpressions = new Set();
const allReadings = new Set();
- const expressions = definition.expressions;
- const sources = Array.isArray(expressions) ? expressions : [definition];
+ const sources = [definition];
for (const {pitches: expressionPitches, expression} of sources) {
allExpressions.add(expression);