From 1f5784599316dae365aa4abd8e279766c4183adc Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Wed, 29 May 2024 11:22:21 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20(frontend):=20Remove=20NATIVE=5F?= =?UTF-8?q?CATEGORIES=20constant=20and=20simplify=20logic=20for=20checking?= =?UTF-8?q?=20template=20code=20value=20in=20GenericNode=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/customNodes/genericNode/index.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/customNodes/genericNode/index.tsx b/src/frontend/src/customNodes/genericNode/index.tsx index 5d70d6b18..366cb5e4f 100644 --- a/src/frontend/src/customNodes/genericNode/index.tsx +++ b/src/frontend/src/customNodes/genericNode/index.tsx @@ -10,7 +10,6 @@ import Loading from "../../components/ui/loading"; import { Textarea } from "../../components/ui/textarea"; import Xmark from "../../components/ui/xmark"; import { - NATIVE_CATEGORIES, RUN_TIMESTAMP_PREFIX, STATUS_BUILD, STATUS_BUILDING, @@ -77,18 +76,14 @@ export default function GenericNode({ // This one should run only once // first check if data.type in NATIVE_CATEGORIES // if not return - if ( - !NATIVE_CATEGORIES.includes(types[data.type]) || - !data.node?.template?.code?.value - ) - return; + if (!data.node?.template?.code?.value) return; const thisNodeTemplate = templates[data.type].template; // if the template does not have a code key // return if (!thisNodeTemplate.code) return; const currentCode = thisNodeTemplate.code?.value; const thisNodesCode = data.node!.template?.code?.value; - const componentsToIgnore = ["Custom Component", "Prompt"]; + const componentsToIgnore = ["Custom Component"]; if ( currentCode !== thisNodesCode && !componentsToIgnore.includes(data.node!.display_name)