From 5be05af5011b515f352b7eb47046b04bd31a1dbd Mon Sep 17 00:00:00 2001 From: keyserfaty Date: Fri, 4 Nov 2016 18:03:12 -0300 Subject: [PATCH] fix bug when adding empty components --- src/vhtml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vhtml.js b/src/vhtml.js index 10962fe..c62689e 100644 --- a/src/vhtml.js +++ b/src/vhtml.js @@ -13,7 +13,7 @@ export default function h(name, attrs) { // Sortof component support! if (typeof name==='function') { - attrs.children = stack.reverse(); + if (attrs) attrs.children = stack.reverse(); return name(attrs); // return name(attrs, stack.reverse()); }