diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-09-12 18:39:01 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-09-12 18:39:01 +0100 |
commit | 9dd0d52cb53cdc86dbac9604c366d62d58c7a85e (patch) | |
tree | 8942b85f5854c40c52b0dc5782cc047cc86d484d | |
parent | 89d864ce5a128dc96a7d90bfb42046de5a7902b7 (diff) | |
download | lustre-9dd0d52cb53cdc86dbac9604c366d62d58c7a85e.tar.gz lustre-9dd0d52cb53cdc86dbac9604c366d62d58c7a85e.zip |
:bug: Fixed a bug where attributes were never rendered as a string because of a flipped bool.
-rw-r--r-- | lib/src/lustre/attribute.gleam | 4 |
1 files 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 |