diff --git a/packages/designer/src/document/node/node.ts b/packages/designer/src/document/node/node.ts index 0369a43b1..952f3df01 100644 --- a/packages/designer/src/document/node/node.ts +++ b/packages/designer/src/document/node/node.ts @@ -157,7 +157,7 @@ export class Node { this.props = new Props(this, props, extras); this._children = new NodeChildren(this as ParentalNode, this.initialChildren(children)); this._children.interalInitParent(); - this.props.import(this.transformProps(props || {}), extras); + this.props.import(this.transformProps(props || {}), this.transformProps(extras || {})); this.setupAutoruns(); } @@ -167,7 +167,6 @@ export class Node { private transformProps(props: any): any { // FIXME! support PropsList return this.document.designer.transformProps(props, this, TransformStage.Init); - // TODO: run transducers in metadata.experimental } private autoruns?: Array<() => void>; @@ -542,14 +541,12 @@ export class Node { const _extras_: { [key: string]: any } = { ...extras, }; - if (_extras_) { - Object.keys(_extras_).forEach((key) => { - const addon = this._addons[key]; - if (addon) { - _extras_[key] = addon(); - } - }); - } + Object.keys(this._addons).forEach((key) => { + const addon = this._addons[key]; + if (addon) { + _extras_[key] = addon(); + } + }); const schema: any = { ...baseSchema,