aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gleam.toml2
-rw-r--r--src/lustre/element.gleam2
2 files changed, 3 insertions, 1 deletions
diff --git a/gleam.toml b/gleam.toml
index 025191d..fff8be5 100644
--- a/gleam.toml
+++ b/gleam.toml
@@ -1,5 +1,5 @@
name = "lustre"
-version = "4.1.6"
+version = "4.1.7"
gleam = ">= 1.0.0"
description = "An Elm-inspired framework for building HTML templates, single page applications, and server-rendered components in Gleam!"
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])])
})