From 9dd0d52cb53cdc86dbac9604c366d62d58c7a85e Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Tue, 12 Sep 2023 18:39:01 +0100 Subject: :bug: Fixed a bug where attributes were never rendered as a string because of a flipped bool. --- lib/src/lustre/attribute.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/lustre/attribute.gleam b/lib/src/lustre/attribute.gleam index 2b55486..0c79692 100644 --- a/lib/src/lustre/attribute.gleam +++ b/lib/src/lustre/attribute.gleam @@ -80,7 +80,7 @@ pub fn to_string(attr: Attribute(msg)) -> String { /// pub fn to_string_builder(attr: Attribute(msg)) -> StringBuilder { case attr { - Attribute(name, value, as_property: True) -> { + Attribute(name, value, as_property: False) -> { case dynamic.classify(value) { "String" -> [name, "=\"", dynamic.unsafe_coerce(value), "\""] @@ -101,7 +101,7 @@ pub fn to_string_builder(attr: Attribute(msg)) -> StringBuilder { |> string_builder.from_strings } } - Attribute(_, _, as_property: False) -> string_builder.new() + Attribute(_, _, as_property: True) -> string_builder.new() Event(on, _) -> ["data-lustre-on:", on] |> string_builder.from_strings -- cgit v1.2.3