diff options
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/database.js | 2 | ||||
-rw-r--r-- | ext/bg/js/translator.js | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 630243b2..b56cf7e2 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -133,7 +133,7 @@ class Database { return results; } - async findTag(name, title) { + async findTagForTitle(name, title) { if (!this.db) { throw 'database not initialized'; } diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 5de99e8e..0ecae16b 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -137,11 +137,13 @@ class Translator { async buildTags(names, title) { const results = []; for (const name of names) { - const meta = await this.database.findTag(name.split(':')[0], title); + const meta = await this.database.findTagForTitle(name.split(':')[0], title); const result = {name}; for (const prop in meta || {}) { - result[prop] = meta[prop]; + if (prop !== 'name') { + result[prop] = meta[prop]; + } } results.push(dictTagSanitize(result)); |