diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-25 23:19:43 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-25 23:19:43 +0100 |
commit | b935ca1899476faa7dd57b7c2c928fb96d5b1bf7 (patch) | |
tree | 87c2f75da038c1a4adb50ff67d9ae6aaf0a1dfb7 | |
parent | 474fd7f903d4c98ae2439bd3f2cd85c468fdbe29 (diff) | |
download | lustre-b935ca1899476faa7dd57b7c2c928fb96d5b1bf7.tar.gz lustre-b935ca1899476faa7dd57b7c2c928fb96d5b1bf7.zip |
:bug: Fixed a bug where handler keys were incorrectly missing '-' separators.
-rw-r--r-- | src/lustre/internals/vdom.gleam | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lustre/internals/vdom.gleam b/src/lustre/internals/vdom.gleam index 4930f80..ff60c5f 100644 --- a/src/lustre/internals/vdom.gleam +++ b/src/lustre/internals/vdom.gleam @@ -68,7 +68,7 @@ fn do_element_list_handlers( key: String, ) { use handlers, element, index <- list.index_fold(elements, handlers) - let key = key <> int.to_string(index) + let key = key <> "-" <> int.to_string(index) do_handlers(element, handlers, key) } @@ -105,7 +105,7 @@ fn do_element_to_json(element: Element(msg), key: String) -> Json { fn do_element_list_to_json(elements: List(Element(msg)), key: String) { json.preprocessed_array({ use element, index <- list.index_map(elements) - let key = key <> int.to_string(index) + let key = key <> "-" <> int.to_string(index) do_element_to_json(element, key) }) } |