summaryrefslogtreecommitdiff
path: root/ext/jp/dictionary.js
diff options
context:
space:
mode:
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};
}
}