From 0d30e9c35329e2ad4a6277a2b5f4d5115fb4d274 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Tue, 16 Apr 2024 18:32:18 +0100 Subject: =?UTF-8?q?=F0=9F=90=9B=20Fixed=20a=20bug=20with=20`Map`=20nodes?= =?UTF-8?q?=20not=20turning=20into=20document=20strings=20correctly.=20(#1?= =?UTF-8?q?07)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: Fixed a bug where stringifying a 'Map' element produced incorrect document strings. * :bookmark: Bump to v4.1.7 --- src/lustre/element.gleam | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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])]) }) -- cgit v1.2.3