From df8d84d07f2d231234b4ab8f4ab37fb60cd7bc1d Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 28 Jul 2023 14:59:40 -0300 Subject: [PATCH] Fixed unknown node not showing --- .../src/CustomNodes/GenericNode/index.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index d49544114..32ade1ad1 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -28,9 +28,6 @@ export default function GenericNode({ const updateNodeInternals = useUpdateNodeInternals(); const showError = useRef(true); const { types, deleteNode, reactFlowInstance } = useContext(typesContext); - // any to avoid type conflict - const Icon: any = - nodeIconsLucide[data.type] || nodeIconsLucide[types[data.type]]; const name = nodeIconsLucide[data.type] ? data.type : types[data.type]; const [validationStatus, setValidationStatus] = useState(null); // State for outline color @@ -67,18 +64,6 @@ export default function GenericNode({ } }, [sseData, data.id]); - if (!Icon) { - if (showError.current) { - setErrorData({ - title: data.type - ? `The ${data.type} node could not be rendered, please review your json file` - : "There was a node that can't be rendered, please review your json file", - }); - showError.current = false; - } - deleteNode(data.id); - return; - } return ( <>