From df9ed59a7160f4bfabf95a208d76c4c6ce21f4dd Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 5 Mar 2021 19:25:31 -0500 Subject: Fix missing meta when reading is empty (#1486) --- ext/js/language/translator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext') 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(); -- cgit v1.2.3