Fix missing meta when reading is empty (#1486)

This commit is contained in:
toasted-nutbread 2021-03-05 19:25:31 -05:00 committed by GitHub
parent ca4d5a2ac1
commit 2203202861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();