diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-12-17 21:42:53 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-12-17 21:42:53 -0800 |
commit | d44f0c576428b69e3deae42893af66371696425b (patch) | |
tree | 347d327cfd409bb6acf7ca777639c2bc08325538 /ext/bg/js/database.js | |
parent | 5be864bb6f1f911bec143566c768bf735a373743 (diff) |
WIP
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r-- | ext/bg/js/database.js | 5 |
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; }) ); } |