From 5b9fd4454b417fb33f1f5f000e7af3bf41854dc5 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 12 Apr 2018 20:42:01 +0300 Subject: [PATCH] $create should read opt.appendChild if selector is string --- js/dom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/dom.js b/js/dom.js index 674ee509..15e935b7 100644 --- a/js/dom.js +++ b/js/dom.js @@ -191,6 +191,7 @@ function $create(selector = 'div', properties, children) { children = properties; } else { opt = properties || {}; + children = children || opt.appendChild; } const idStart = (selector.indexOf('#') + 1 || selector.length + 1) - 1; const classStart = (selector.indexOf('.') + 1 || selector.length + 1) - 1;