aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-05 21:30:51 -0500
committerGitHub <noreply@github.com>2020-12-05 21:30:51 -0500
commitf89f9d777f3e9cdc3503763de7f4486a6f0b8d73 (patch)
tree2e423c309ee5bb7186b1530bf68070abd7eb7839 /ext
parentcd19be8954ef3d52fcb51a7cd10bfd30b8f2de93 (diff)
Use expression as reading if reading is blank (#1083)
Diffstat (limited to 'ext')
-rw-r--r--ext/mixed/js/dictionary-data-util.js3
1 files changed, 2 insertions, 1 deletions
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);