Skip to content

Commit 9a8553e

Browse files
committed
chore(review): address cursorbot
1 parent 0c075a6 commit 9a8553e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/sdks/src/functions/evaluate/helpers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ export function flattenState({
110110
);
111111
}
112112

113-
// Create a new object to avoid mutating original state
114-
rootSetState?.({ ...target, [prop]: value });
113+
if (rootSetState) {
114+
// Create a new object to avoid mutating original state
115+
rootSetState({ ...target, [prop]: value });
116+
} else {
117+
target[prop] = value;
118+
}
115119
return true;
116120
},
117121
});

0 commit comments

Comments
 (0)