Skip to content

Commit

Permalink
preserve children in $create
Browse files Browse the repository at this point in the history
  • Loading branch information
tophf committed Oct 21, 2023
1 parent 112daa7 commit f6e3674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f6e3674

Please sign in to comment.