summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index eaa7dd01..e99cdeab 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -121,7 +121,13 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) {
const indexDir = indexUrl.slice(0, indexUrl.lastIndexOf('/'));
return loadJson(indexUrl).then(index => {
if (indexLoaded !== null) {
- return indexLoaded(index.title, index.version).then(() => index);
+ return indexLoaded(
+ index.title,
+ index.version,
+ index.entities,
+ index.termBanks > 0,
+ index.kanjiBanks > 0
+ ).then(() => index);
}
return index;
@@ -134,7 +140,6 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) {
const bankUrl = `${indexDir}/term_bank_${i}.json`;
loaders.push(() => loadJson(bankUrl).then(entries => termsLoaded(
index.title,
- index.version,
entries,
banksTotal,
banksLoaded++
@@ -145,7 +150,6 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) {
const bankUrl = `${indexDir}/kanji_bank_${i}.json`;
loaders.push(() => loadJson(bankUrl).then(entries => kanjiLoaded(
index.title,
- index.version,
entries,
banksTotal,
banksLoaded++