1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Merge pull request #8527 from Budibase/bug/sev3/custom-options-multi-picker

Check schema exists for custom options multi picker
This commit is contained in:
melohagan 2022-11-04 20:28:48 +00:00 committed by GitHub
commit 9552c3bce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,7 +131,7 @@
const getDefault = (defaultValue, schema, type) => { const getDefault = (defaultValue, schema, type) => {
// Remove any values not present in the field schema // Remove any values not present in the field schema
// Convert any values supplied to string // Convert any values supplied to string
if (Array.isArray(defaultValue) && type == "array") { if (Array.isArray(defaultValue) && type == "array" && schema) {
return defaultValue.reduce((acc, entry) => { return defaultValue.reduce((acc, entry) => {
let processedOption = String(entry) let processedOption = String(entry)
let schemaOptions = schema.constraints.inclusion let schemaOptions = schema.constraints.inclusion