aboutsummaryrefslogtreecommitdiff
path: root/ext/jp/dictionary.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-22 20:02:41 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-22 20:02:41 -0700
commit495c12b6c27968837c135902b4446c3bba958590 (patch)
treef81a7698341d34edb17373cb6ff6f8728bf73ffb /ext/jp/dictionary.js
parentf6342da49da58b966275c7fde699ce38f5d68b0b (diff)
Maybe this works
Diffstat (limited to 'ext/jp/dictionary.js')
-rw-r--r--ext/jp/dictionary.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/jp/dictionary.js b/ext/jp/dictionary.js
index 871a9550..18a15ab0 100644
--- a/ext/jp/dictionary.js
+++ b/ext/jp/dictionary.js
@@ -56,7 +56,7 @@ class Dictionary {
findTermInDict(term, dict) {
return (dict.indices[term] || []).map(index => {
const [e, r, g, t] = dict.defs[index];
- return {expression: e, reading: r, glossary: g, tags: t};
+ return {id: index, expression: e, reading: r, glossary: g, tags: t};
});
}
@@ -67,6 +67,6 @@ class Dictionary {
}
const [c, k, o, g] = def;
- return {character: c, kunyomi: k, onyomi: o, glossary: g};
+ return {id: kanji.charCodeAt(0), character: c, kunyomi: k, onyomi: o, glossary: g};
}
}