aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-12-23 21:59:19 -0800
committerAlex Yatskov <alex@foosoft.net>2016-12-23 21:59:19 -0800
commitb81e11f633ab9a0f41b5ab28b032b8493f25150a (patch)
tree9eb51ddb400dfeb747555e8bae8e23e7022efe36 /ext/bg/js/util.js
parent22128a948ae052592a17e9cee2a2d24cd0ebad31 (diff)
revision support
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index a37e223c..059f3160 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -159,7 +159,7 @@ function loadJsonInt(url) {
function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) {
const indexDir = indexUrl.slice(0, indexUrl.lastIndexOf('/'));
return loadJson(indexUrl).then(index => {
- if (!index.title || !index.version) {
+ if (!index.title || !index.version || !index.revision) {
return Promise.reject('unrecognized dictionary format');
}
@@ -167,7 +167,8 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) {
return indexLoaded(
index.title,
index.version,
- index.tagMeta,
+ index.revision,
+ index.tagMeta || {},
index.termBanks > 0,
index.kanjiBanks > 0
).then(() => index);