Linting
This commit is contained in:
parent
98963c1505
commit
f8da7a9f28
|
@ -129,20 +129,18 @@ export function importToRows(
|
|||
// the real schema of the table passed in, not the clone used for
|
||||
// incrementing auto IDs
|
||||
for (const [fieldName, schema] of Object.entries(originalTable.schema)) {
|
||||
const rowVal = Array.isArray(row[fieldName]) ? row[fieldName] : [row[fieldName]]
|
||||
const rowVal = Array.isArray(row[fieldName])
|
||||
? row[fieldName]
|
||||
: [row[fieldName]]
|
||||
if (
|
||||
(schema.type === FieldTypes.OPTIONS ||
|
||||
schema.type === FieldTypes.ARRAY) &&
|
||||
schema.type === FieldTypes.ARRAY) &&
|
||||
row[fieldName]
|
||||
) {
|
||||
|
||||
let merged = [
|
||||
...schema.constraints!.inclusion!,
|
||||
...rowVal
|
||||
]
|
||||
|
||||
let superSet = new Set(merged);
|
||||
schema.constraints!.inclusion = Array.from(superSet);
|
||||
let merged = [...schema.constraints!.inclusion!, ...rowVal]
|
||||
|
||||
let superSet = new Set(merged)
|
||||
schema.constraints!.inclusion = Array.from(superSet)
|
||||
|
||||
schema.constraints!.inclusion.sort()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue