From 8e65ba5f17a8fde900d46f3fa0ced45c0ca1ad02 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 2 Mar 2024 15:20:21 -0300 Subject: [PATCH] Fix handling of empty state in SharedState.py --- src/backend/langflow/components/utilities/SharedState.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/langflow/components/utilities/SharedState.py b/src/backend/langflow/components/utilities/SharedState.py index 3e715cf1a..d3c5e20fb 100644 --- a/src/backend/langflow/components/utilities/SharedState.py +++ b/src/backend/langflow/components/utilities/SharedState.py @@ -35,4 +35,6 @@ class SharedState(CustomComponent): state = Record(data=state) else: state = Record(text=str(state)) + elif not state: + state = Record(text="") return state