Return nullish button action function for empty arrays
This commit is contained in:
parent
4bc2c7a28f
commit
1a23970a38
|
@ -334,8 +334,8 @@ const confirmTextMap = {
|
|||
*/
|
||||
export const enrichButtonActions = (actions, context) => {
|
||||
// Prevent button actions in the builder preview
|
||||
if (!actions || get(builderStore).inBuilder) {
|
||||
return () => {}
|
||||
if (!actions?.length || get(builderStore).inBuilder) {
|
||||
return null
|
||||
}
|
||||
|
||||
// If this is a function then it has already been enriched
|
||||
|
|
Loading…
Reference in New Issue