This commit is contained in:
mike12345567 2021-11-08 18:27:18 +00:00
parent 2312defd3c
commit d5f10f5f13
1 changed files with 4 additions and 1 deletions

View File

@ -181,7 +181,10 @@ module External {
function fixArrayTypes(row: Row, table: Table) {
for (let [fieldName, schema] of Object.entries(table.schema)) {
if (schema.type === FieldTypes.ARRAY && typeof row[fieldName] === "string") {
if (
schema.type === FieldTypes.ARRAY &&
typeof row[fieldName] === "string"
) {
try {
row[fieldName] = JSON.parse(row[fieldName])
} catch (err) {