Fixing blank tags
This commit is contained in:
parent
83f5bd24df
commit
e51f43886b
@ -79,7 +79,7 @@ class Dictionary {
|
|||||||
results.push({
|
results.push({
|
||||||
expression: row.expression,
|
expression: row.expression,
|
||||||
reading: row.reading,
|
reading: row.reading,
|
||||||
tags: row.tags.split(' '),
|
tags: splitField(row.tags),
|
||||||
glossary: row.glossary,
|
glossary: row.glossary,
|
||||||
id: row.id
|
id: row.id
|
||||||
});
|
});
|
||||||
@ -103,9 +103,9 @@ class Dictionary {
|
|||||||
return this.db.kanji.where('character').equals(kanji).each(row => {
|
return this.db.kanji.where('character').equals(kanji).each(row => {
|
||||||
results.push({
|
results.push({
|
||||||
character: row.character,
|
character: row.character,
|
||||||
onyomi: row.onyomi.split(' '),
|
onyomi: splitField(row.onyomi),
|
||||||
kunyomi: row.kunyomi.split(' '),
|
kunyomi: splitField(row.kunyomi),
|
||||||
tags: row.tags.split(' '),
|
tags: splitField(row.tags),
|
||||||
glossary: row.meanings
|
glossary: row.meanings
|
||||||
});
|
});
|
||||||
}).then(() => results);
|
}).then(() => results);
|
||||||
|
@ -112,3 +112,7 @@ function applyTagMeta(tag, meta) {
|
|||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function splitField(field) {
|
||||||
|
return field.length === 0 ? [] : field.split(' ');
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user