Skip to content

Commit

Permalink
Merge pull request #946 from jetstreamapp/bug/936
Browse files Browse the repository at this point in the history
Prevent crash if invalid field configuration
  • Loading branch information
paustint authored Jun 26, 2024
2 parents a88ace1 + 30bfd8c commit 9e9c497
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libs/shared/ui-core/src/create-fields/create-fields-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ function prepareFieldPayload(sobject: string, fieldValues: FieldValues, orgNames
valueSetDefinition: {
sorted: false,
// sorted: fieldValues.sorted.value,
value: (fieldValues.valueSet.value as string).split('\n').map((value, i) => ({
fullName: value,
label: value,
default: fieldValues.firstAsDefault.value && i === 0,
})),
value:
(fieldValues.valueSet.value as string)?.split('\n').map((value, i) => ({
fullName: value,
label: value,
default: fieldValues.firstAsDefault.value && i === 0,
})) || [],
},
};
}
Expand Down

0 comments on commit 9e9c497

Please sign in to comment.