mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
convert string children to text nodes
This commit is contained in:
parent
618c4ffe20
commit
77eeacb09b
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user