Merge pull request #6068 from Budibase/bug/sev3/error-when-changing-between-values-bindings-in-automations

Make sure linkedRows is an array before map
This commit is contained in:
melohagan 2022-06-01 13:30:19 +01:00 committed by GitHub
commit 2faf8e7df6
1 changed files with 3 additions and 1 deletions

View File

@ -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)