Skip to content

Commit 369edcf

Browse files
committed
fix: auto-update structured clone object onchange
1 parent 231e6f2 commit 369edcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/hooks/useField.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const useField = <TSchema extends ISchemaFieldCore>(props: {
2828
const latestState = _state.current;
2929
const state = form.getSchemaFieldState(schema as any);
3030
if (JSON.stringify(state) !== JSON.stringify(latestState)) {
31-
_state.current = state;
31+
_state.current = structuredClone(state);
3232
update();
3333
}
3434
},

0 commit comments

Comments
 (0)