From 65842300e080ebfdceba4ca09ab61bb55f0db0dc Mon Sep 17 00:00:00 2001 From: Mario Santos <34552881+SantosGuillamot@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:45:18 +0200 Subject: [PATCH] Only use `canUserEditValue` when `setValues` is defined (#65566) Co-authored-by: SantosGuillamot Co-authored-by: gziolo Co-authored-by: cbravobernal --- packages/blocks/src/store/reducer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/blocks/src/store/reducer.js b/packages/blocks/src/store/reducer.js index fbcec7a619cf63..4aa0b922e090fd 100644 --- a/packages/blocks/src/store/reducer.js +++ b/packages/blocks/src/store/reducer.js @@ -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, }, };