* relate to componentMeta.advanced.initialChildren
(children: NodeSchema | NodeSchema[] | undefined)
| 217 | * relate to componentMeta.advanced.initialChildren |
| 218 | */ |
| 219 | private initialChildren(children: NodeSchema | NodeSchema[] | undefined): NodeSchema[] { |
| 220 | const { initialChildren } = this.componentMeta.advanced |
| 221 | |
| 222 | if (children == null) { |
| 223 | if (initialChildren) { |
| 224 | if (typeof initialChildren === 'function') { |
| 225 | return initialChildren(this) || [] |
| 226 | } |
| 227 | return initialChildren |
| 228 | } |
| 229 | return [] |
| 230 | } |
| 231 | |
| 232 | if (Array.isArray(children)) { |
| 233 | return children |
| 234 | } |
| 235 | |
| 236 | return [children] |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * link to componentMeta.advanced.callbacks.onNodeAdd |