diff --git a/src/core/HNode.ts b/src/core/HNode.ts index 2b7910a..4c5a7a1 100644 --- a/src/core/HNode.ts +++ b/src/core/HNode.ts @@ -79,7 +79,7 @@ export const toNodeArr = function toNodes( if (_isArray(src) && src.length) { - return src.flat(_Infinity).map(s => toNodeArr(s, context, ownerNode, owner)).flat(); + return src.flat(_Infinity).flatMap(s => toNodeArr(s, context, ownerNode, owner)); } else if (isHNode(src)) { diff --git a/test/test.html b/test/test.html index 1900f3a..3dbdc67 100644 --- a/test/test.html +++ b/test/test.html @@ -19,8 +19,9 @@
- - + + +