Skip to content

Commit

Permalink
Only use canUserEditValue when setValues is defined (#65566)
Browse files Browse the repository at this point in the history
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
  • Loading branch information
4 people authored and gutenbergplugin committed Sep 24, 2024
1 parent b26e274 commit 6584230
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/blocks/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ export function blockBindingsSources( state = {}, action ) {
),
getValues: action.getValues,
setValues: action.setValues,
canUserEditValue: action.canUserEditValue,
// Only set `canUserEditValue` if `setValues` is also defined.
canUserEditValue:
action.setValues && action.canUserEditValue,
getFieldsList: action.getFieldsList,
},
};
Expand Down

0 comments on commit 6584230

Please sign in to comment.