Make sure linkedRows is an array before map
This commit is contained in:
parent
48df8b81c7
commit
7da5a10c2e
|
@ -8,7 +8,9 @@
|
|||
export let linkedRows = []
|
||||
|
||||
let rows = []
|
||||
let linkedIds = (linkedRows || [])?.map(row => row?._id || row)
|
||||
let linkedIds = (Array.isArray(linkedRows) ? linkedRows : [])?.map(
|
||||
row => row?._id || row
|
||||
)
|
||||
|
||||
$: linkedRows = linkedIds
|
||||
$: label = capitalise(schema.name)
|
||||
|
|
Loading…
Reference in New Issue