@@ -81,9 +81,9 @@ module.exports = function(modules) {
8181 this . children = void 0 ;
8282 this . onRender = void 0 ;
8383 this . name = name ;
84- this . props = props ;
84+ this . props = props || { } ;
8585 this . children = children ;
86- var onRender = props . onRender ;
86+ var onRender = this . props . onRender ;
8787 if ( "function" == typeof onRender ) {
8888 this . onRender = onRender ;
8989 delete props . onRender ;
@@ -129,8 +129,9 @@ module.exports = function(modules) {
129129 this . props = void 0 ;
130130 this . children = void 0 ;
131131 this . component = component ;
132- this . props = props ;
132+ this . props = props || { } ;
133133 this . children = children ;
134+ this . props . children = children ;
134135 }
135136 var _proto4 = ComponentNode . prototype ;
136137 _proto4 . renderComponent = function ( renderer ) {
@@ -152,7 +153,7 @@ module.exports = function(modules) {
152153 var result = [ ] ;
153154 for ( var _i6 = 0 ; _i6 < children . length ; _i6 ++ ) {
154155 var child = children [ _i6 ] ;
155- if ( child ) if ( "string" == typeof child || "number" == typeof child ) result . push ( new node_TextNode ( "" + child ) ) ; else {
156+ if ( child ) if ( "string" == typeof child || "number" == typeof child ) result . push ( new node_TextNode ( child . toString ( ) ) ) ; else {
156157 if ( "boolean" == typeof child ) continue ;
157158 if ( Array . isArray ( child ) ) for ( var _i8 = 0 , _normalizeChildren2 = normalizeChildren ( child ) ; _i8 < _normalizeChildren2 . length ; _i8 ++ ) result . push ( _normalizeChildren2 [ _i8 ] ) ; else {
158159 if ( ! child || "element" !== child . type && "text" !== child . type && "component" !== child . type ) throw new TypeError ( "Unrecognized node type: " + typeof child ) ;
@@ -164,7 +165,6 @@ module.exports = function(modules) {
164165 }
165166 var node_node = function ( element , props ) {
166167 for ( var _len = arguments . length , children = new Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) children [ _key - 2 ] = arguments [ _key ] ;
167- props = props || { } ;
168168 children = normalizeChildren ( children ) ;
169169 if ( "string" == typeof element ) return new node_ElementNode ( element , props , children ) ;
170170 if ( "function" == typeof element ) return new node_ComponentNode ( element , props , children ) ;
0 commit comments