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