aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-12-18 11:52:11 -0800
committerAlex Yatskov <alex@foosoft.net>2016-12-18 11:52:11 -0800
commit9395d467120c3a6ef2d0b50d19a9bf46d0f7fa7d (patch)
tree575c618d3737ffdff3ada45b7e999c19793227ee /ext/bg/js/database.js
parente5275560cecc839930c4fdad52dc96df512212e1 (diff)
WIP
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index e596dbad..a2e334fc 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -238,13 +238,15 @@ class Database {
const rows = [];
for (const tag in tagMeta || {}) {
const meta = tagMeta[tag];
- rows.push({
+ const row = sanitizeTag({
name: tag,
- category: meta.category || 'default',
- notes: meta.notes || '',
- order: meta.order || 0,
+ category: meta.category,
+ notes: meta.notes,
+ order: meta.order,
dictionary: title
});
+
+ rows.push(row);
}
return this.db.tagMeta.bulkAdd(rows);