File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/designer/src/document/node Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export class NodeChildren implements INodeChildren {
102102 options : any = { } ,
103103 ) {
104104 makeObservable ( this ) ;
105- this . children = ( Array . isArray ( data ) ? data : [ data ] ) . map ( ( child ) => {
105+ this . children = ( Array . isArray ( data ) ? data : [ data ] ) . filter ( child => ! ! child ) . map ( ( child ) => {
106106 return this . owner . document ?. createNode ( child , options . checkId ) ;
107107 } ) ;
108108 }
@@ -127,7 +127,7 @@ export class NodeChildren implements INodeChildren {
127127 }
128128
129129 import ( data ?: IPublicTypeNodeData | IPublicTypeNodeData [ ] , checkId = false ) {
130- data = data ? ( Array . isArray ( data ) ? data : [ data ] ) : [ ] ;
130+ data = ( data ? ( Array . isArray ( data ) ? data : [ data ] ) : [ ] ) . filter ( d => ! ! d ) ;
131131
132132 const originChildren = this . children . slice ( ) ;
133133 this . children . forEach ( ( child ) => child . internalSetParent ( null ) ) ;
You can’t perform that action at this time.
0 commit comments