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 db4092fbe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)