old database format compatibility

This commit is contained in:
siikamiika 2017-10-18 11:08:54 +03:00
parent 2cbbcd242e
commit b59980067a

View File

@ -71,7 +71,7 @@ class Database {
results.push({ results.push({
expression: row.expression, expression: row.expression,
reading: row.reading, reading: row.reading,
definitionTags: dictFieldSplit(row.definitionTags), definitionTags: dictFieldSplit(row.definitionTags || row.tags || ''),
termTags: dictFieldSplit(row.termTags || ''), termTags: dictFieldSplit(row.termTags || ''),
rules: dictFieldSplit(row.rules), rules: dictFieldSplit(row.rules),
glossary: row.glossary, glossary: row.glossary,
@ -97,7 +97,7 @@ class Database {
results.push({ results.push({
expression: row.expression, expression: row.expression,
reading: row.reading, reading: row.reading,
definitionTags: dictFieldSplit(row.definitionTags), definitionTags: dictFieldSplit(row.definitionTags || row.tags || ''),
termTags: dictFieldSplit(row.termTags || ''), termTags: dictFieldSplit(row.termTags || ''),
rules: dictFieldSplit(row.rules), rules: dictFieldSplit(row.rules),
glossary: row.glossary, glossary: row.glossary,
@ -123,7 +123,7 @@ class Database {
results.push({ results.push({
expression: row.expression, expression: row.expression,
reading: row.reading, reading: row.reading,
definitionTags: dictFieldSplit(row.definitionTags), definitionTags: dictFieldSplit(row.definitionTags || row.tags || ''),
termTags: dictFieldSplit(row.termTags || ''), termTags: dictFieldSplit(row.termTags || ''),
rules: dictFieldSplit(row.rules), rules: dictFieldSplit(row.rules),
glossary: row.glossary, glossary: row.glossary,