From f89f9d777f3e9cdc3503763de7f4486a6f0b8d73 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 5 Dec 2020 21:30:51 -0500 Subject: [PATCH] Use expression as reading if reading is blank (#1083) --- ext/mixed/js/dictionary-data-util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/mixed/js/dictionary-data-util.js b/ext/mixed/js/dictionary-data-util.js index 761bfc1c..1834b5f3 100644 --- a/ext/mixed/js/dictionary-data-util.js +++ b/ext/mixed/js/dictionary-data-util.js @@ -23,7 +23,8 @@ class DictionaryDataUtil { const allExpressions = 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); allReadings.add(reading);