From 9d87b8ecf6cb561a4a81d2da96e5fec0584037d4 Mon Sep 17 00:00:00 2001 From: Comahar Date: Thu, 16 Jul 2026 17:38:09 +0300 Subject: [PATCH] Fix StringListJoin treating sep as a list StringListJoin has no INPUT_IS_LIST, so sep is a plain string; sep[0] was taking only the first character. --- src/basic_data_handling/string_nodes.py | 3 +-- tests/test_string_nodes.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/basic_data_handling/string_nodes.py b/src/basic_data_handling/string_nodes.py index 3fa6f26..02dc638 100644 --- a/src/basic_data_handling/string_nodes.py +++ b/src/basic_data_handling/string_nodes.py @@ -752,8 +752,7 @@ class StringListJoin(ComfyNodeABC): FUNCTION = "join" def join(self, sep, strings): - separator = sep[0] # everything comes as a list, so sep is list[str] - return (separator.join(strings),) + return (sep.join(strings),) class StringLjust(ComfyNodeABC): diff --git a/tests/test_string_nodes.py b/tests/test_string_nodes.py index eec010f..ff17247 100644 --- a/tests/test_string_nodes.py +++ b/tests/test_string_nodes.py @@ -226,9 +226,9 @@ def test_join(): # Test ListJoin variant node_list = StringListJoin() - assert node_list.join([", "], ["apple", "banana", "cherry"]) == ("apple, banana, cherry",) - assert node_list.join([""], ["a", "b", "c"]) == ("abc",) - assert node_list.join(["-"], []) == ("",) # Empty list + assert node_list.join(", ", ["apple", "banana", "cherry"]) == ("apple, banana, cherry",) + assert node_list.join("", ["a", "b", "c"]) == ("abc",) + assert node_list.join("-", []) == ("",) # Empty list def test_ljust(): node = StringLjust()