aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-12-17 21:42:53 -0800
committerAlex Yatskov <alex@foosoft.net>2016-12-17 21:42:53 -0800
commitd44f0c576428b69e3deae42893af66371696425b (patch)
tree347d327cfd409bb6acf7ca777639c2bc08325538 /ext/bg/js/database.js
parent5be864bb6f1f911bec143566c768bf735a373743 (diff)
WIP
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index 6f474e77..1bcceb05 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -64,6 +64,7 @@ class Database {
reading: row.reading,
tags: splitField(row.tags),
glossary: row.glossary,
+ score: row.score,
dictionary: row.dictionary,
id: row.id
});
@@ -117,7 +118,7 @@ class Database {
continue;
}
- const tagMeta = this.tagMetaCache[dictionary] = {};
+ const tagMeta = {};
promises.push(
this.db.tagMeta.where('dictionary').equals(dictionary).each(row => {
tagMeta[row.name] = {
@@ -125,6 +126,8 @@ class Database {
notes: row.notes,
order: row.order
};
+ }).then(() => {
+ this.tagMetaCache[dictionary] = tagMeta;
})
);
}