From 89830945c0dfed279deb126ef93702e8bc4a7564 Mon Sep 17 00:00:00 2001
From: Leonardo <leomilho@gmail.com>
Date: Wed, 12 Jun 2024 20:56:42 +0200
Subject: [PATCH] fix: querypill with no name

---
 .../pills/customFlowPills/logicpill/QueryLogicPill.tsx      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libs/shared/lib/querybuilder/pills/customFlowPills/logicpill/QueryLogicPill.tsx b/libs/shared/lib/querybuilder/pills/customFlowPills/logicpill/QueryLogicPill.tsx
index 79cdea0e8..032ae41e0 100644
--- a/libs/shared/lib/querybuilder/pills/customFlowPills/logicpill/QueryLogicPill.tsx
+++ b/libs/shared/lib/querybuilder/pills/customFlowPills/logicpill/QueryLogicPill.tsx
@@ -54,6 +54,12 @@ export function QueryLogicPill(node: SchemaReactflowLogicNode) {
     if (inputReference?.current) inputReference.current.focus();
   }, [node.id]);
 
+  // FIXME: This is a temporary fix to prevent the logic pill from rendering when the input is not set
+  if (!logic.input) {
+    console.error('LogicPill: logic.input is undefined', logic.input);
+    return null;
+  }
+
   return (
     <LogicPill
       title={connectionsToLeft[0]?.attributes?.sourceHandleData.attributeName}
-- 
GitLab