Use expression as reading if reading is blank (#1083)

This commit is contained in:
toasted-nutbread 2020-12-05 21:30:51 -05:00 committed by GitHub
parent cd19be8954
commit f89f9d777f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,8 @@ class DictionaryDataUtil {
const allExpressions = new Set(); const allExpressions = new Set();
const allReadings = new Set(); const allReadings = new Set();
for (const {expression, reading, pitches: expressionPitches} of definition.expressions) { for (let {expression, reading, pitches: expressionPitches} of definition.expressions) {
if (reading.length === 0) { reading = expression; }
allExpressions.add(expression); allExpressions.add(expression);
allReadings.add(reading); allReadings.add(reading);