Skip to content

Commit

Permalink
fix(core): fix the name property is not lost when cloning and seriali…
Browse files Browse the repository at this point in the history
…zing node
  • Loading branch information
janryWang committed Aug 27, 2021
1 parent 5291fe4 commit e11fecf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/models/TreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ export class TreeNode {
id: uid(),
componentName: this.componentName,
props: toJS(this.props),
name: this.name,
children: [],
},
parent ? parent : this.parent
Expand Down Expand Up @@ -692,6 +693,7 @@ export class TreeNode {
componentName: this.componentName,
props: toJS(this.props),
hidden: this.hidden,
name: this.name,
children: this.children.map((treeNode) => {
return treeNode.serialize()
}),
Expand Down

0 comments on commit e11fecf

Please sign in to comment.