From f6e3674dc5e2645cde5d50f4f01b5431632091e6 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 21 Oct 2023 23:55:15 +0300 Subject: [PATCH] preserve children in $create --- js/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dom.js b/js/dom.js index 5ffdf929b8..cd66f407e0 100644 --- a/js/dom.js +++ b/js/dom.js @@ -116,7 +116,7 @@ function $create(selector = 'div', properties, children) { if (typeof selector === 'string') { if (Array.isArray(properties) || properties instanceof Node || - typeof properties !== 'object') { + typeof properties !== 'object' && children == null) { opt = {}; children = properties; } else {