# HG changeset patch # User cin # Date 2020-03-05 22:27:37 # Node ID 6c01fabe9ea9fb5e753fbeae8b0d2664e7072a66 # Parent 54dba1f82a1bfb3438e38f32e1f5e0e15aebb3bf tsx: Added auto unfolding arrays of children when constructing DOM diff --git a/src/main/ts/tsx/BuildContextBase.ts b/src/main/ts/tsx/BuildContextBase.ts --- a/src/main/ts/tsx/BuildContextBase.ts +++ b/src/main/ts/tsx/BuildContextBase.ts @@ -18,7 +18,8 @@ export abstract class BuildContextBase { this._setAttrs(v); else mixin(this._attrs, v); - + } else if (v instanceof Array) { + v.forEach(x => this._addChild(x)); } else { if (this._created) this._addChild(v);