aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language/dictionary-data-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-06 15:53:45 -0500
committerGitHub <noreply@github.com>2021-03-06 15:53:45 -0500
commit16217728afe0f9ff7dcbb7c7b7ead454ccc8705f (patch)
tree126bc188bd675343ee4e796826177e14f6664094 /ext/js/language/dictionary-data-util.js
parenta65742a884223451324fcab5cfaeb6ebdfe32ec1 (diff)
Improve empty reading handling (#1497)
* Handle empty readings earlier in the definition creation process * Remove empty reading check * Remove special handling of empty readings
Diffstat (limited to 'ext/js/language/dictionary-data-util.js')
-rw-r--r--ext/js/language/dictionary-data-util.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/js/language/dictionary-data-util.js b/ext/js/language/dictionary-data-util.js
index 70a51e89..b3a354a7 100644
--- a/ext/js/language/dictionary-data-util.js
+++ b/ext/js/language/dictionary-data-util.js
@@ -96,8 +96,7 @@ class DictionaryDataUtil {
const allExpressions = new Set();
const allReadings = new Set();
- for (let {expression, reading, pitches: expressionPitches} of definition.expressions) {
- if (reading.length === 0) { reading = expression; }
+ for (const {expression, reading, pitches: expressionPitches} of definition.expressions) {
allExpressions.add(expression);
allReadings.add(reading);