Skip to content

Commit

Permalink
fix(g-base): container类卸载后再去调用getChildren报错 (#1634)
Browse files Browse the repository at this point in the history
Co-authored-by: 王学通 <[email protected]>
  • Loading branch information
dudu824 and 王学通 authored Mar 8, 2024
1 parent 90e4f6c commit 4f71305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/g-base/src/abstract/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ abstract class Container extends Element implements IContainer {
}

getChildren(): IElement[] {
return this.get('children') as IElement[];
return (this.get('children') || []) as IElement[];
}

sort() {
Expand Down

0 comments on commit 4f71305

Please sign in to comment.