From 77eeacb09b5287373232a1bf32ac6ac51f9434de Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 26 Feb 2019 20:49:32 +0100 Subject: [PATCH] convert string children to text nodes --- src/ui/web/html.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/web/html.js b/src/ui/web/html.js index 0335ca69..9946887d 100644 --- a/src/ui/web/html.js +++ b/src/ui/web/html.js @@ -12,6 +12,9 @@ export function el(elementName, attrs, children) { if (Array.isArray(children)) { // TODO: use fragment here? for (let c of children) { + if (typeof c === "string") { + c = text(c); + } e.appendChild(c); } }