diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-03-05 19:25:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 19:25:31 -0500 |
commit | 22032028617c5a3f9bb4e3855345e92306e294ae (patch) | |
tree | 56dfea75797085a2fc937228742b05fb5d7dcdea /ext/js/language/translator.js | |
parent | ca4d5a2ac19d1e97025b579157568fb1e9fa0701 (diff) |
Fix missing meta when reading is empty (#1486)
Diffstat (limited to 'ext/js/language/translator.js')
-rw-r--r-- | ext/js/language/translator.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index 394e5eac..84ab0350 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -646,7 +646,8 @@ class Translator { for (const {expressions, frequencies: frequencies1, pitches: pitches1} of allDefinitions) { for (let i = 0, ii = expressions.length; i < ii; ++i) { - const {expression, reading, frequencies: frequencies2, pitches: pitches2} = expressions[i]; + let {expression, reading, frequencies: frequencies2, pitches: pitches2} = expressions[i]; + if (reading.length === 0) { reading = expression; } let readingMap = expressionMap.get(expression); if (typeof readingMap === 'undefined') { readingMap = new Map(); |