Skip to content

Commit

Permalink
fix self-loop bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikaoto committed Jul 15, 2023
1 parent de4e989 commit 97b353d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/state/createState.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const createState = function (element, parent, options) {
if (skipApplyMethods) {
if (element.parent && element.parent.state) {
element.state.parent = element.parent.state
} else { element.state.parent = element.state } // self loop
else
element.state.parent = {}
return element.state
}

Expand Down

0 comments on commit 97b353d

Please sign in to comment.