We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c075a6 commit 9a8553eCopy full SHA for 9a8553e
1 file changed
packages/sdks/src/functions/evaluate/helpers.ts
@@ -110,8 +110,12 @@ export function flattenState({
110
);
111
}
112
113
- // Create a new object to avoid mutating original state
114
- rootSetState?.({ ...target, [prop]: value });
+ if (rootSetState) {
+ // Create a new object to avoid mutating original state
115
+ rootSetState({ ...target, [prop]: value });
116
+ } else {
117
+ target[prop] = value;
118
+ }
119
return true;
120
},
121
});
0 commit comments