Browse Source
Merge pull request #7113 from Budibase/bug/sev3/options-picker-set-value-relationship-picker
Options picker set value for relationship picker - handle non-array values
master
melohagan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
packages/client/src/components/app/forms/RelationshipField.svelte
|
|
@ -55,6 +55,9 @@ |
|
|
if (!values) { |
|
|
if (!values) { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
|
|
|
if (!Array.isArray(values)) { |
|
|
|
|
|
values = [values] |
|
|
|
|
|
} |
|
|
return values.map(value => (typeof value === "object" ? value._id : value)) |
|
|
return values.map(value => (typeof value === "object" ? value._id : value)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|