aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language/translator.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-05 19:25:31 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-07 15:42:46 -0500
commitdf9ed59a7160f4bfabf95a208d76c4c6ce21f4dd (patch)
tree7a4f53ac30a3912c01b6e4c60d457803dfc001eb /ext/js/language/translator.js
parent68e4d1fbd5545953885a673a70cb9ed0e2a55b2a (diff)
Fix missing meta when reading is empty (#1486)
Diffstat (limited to 'ext/js/language/translator.js')
-rw-r--r--ext/js/language/translator.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js
index e530811b..e78b928b 100644
--- a/ext/js/language/translator.js
+++ b/ext/js/language/translator.js
@@ -662,7 +662,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();