diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-10 10:04:28 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-10 10:04:28 +0100 |
commit | 7b8905c215845140085798a2913c0b7f3ea70bf2 (patch) | |
tree | d29e3d1f6432b90aa706ddf56843edbf38790a2a | |
parent | 7f17ed5825d73b19c0483ccf03e75702a989e7b9 (diff) | |
download | lustre-7b8905c215845140085798a2913c0b7f3ea70bf2.tar.gz lustre-7b8905c215845140085798a2913c0b7f3ea70bf2.zip |
:bug: Fixed a bug where stringifying a 'Map' element produced incorrect document strings.
-rw-r--r-- | src/lustre/element.gleam | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lustre/element.gleam b/src/lustre/element.gleam index 412c7e3..8487db3 100644 --- a/src/lustre/element.gleam +++ b/src/lustre/element.gleam @@ -313,6 +313,7 @@ pub fn to_document_string(el: Element(msg)) -> String { Element(tag: "html", ..) -> el Element(tag: "head", ..) | Element(tag: "body", ..) -> element("html", [], [el]) + Map(subtree) -> subtree() _ -> element("html", [], [element("body", [], [el])]) }) @@ -341,6 +342,7 @@ pub fn to_document_string_builder(el: Element(msg)) -> StringBuilder { Element(tag: "html", ..) -> el Element(tag: "head", ..) | Element(tag: "body", ..) -> element("html", [], [el]) + Map(subtree) -> subtree() _ -> element("html", [], [element("body", [], [el])]) }) |