From 740cb874c902fdb9a05b0798ca6da1df7659e916 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Sat, 8 Jun 2024 12:01:15 -0300 Subject: [PATCH] update CheckCodeValidity --- .../src/CustomNodes/hooks/use-check-code-validity.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx index 833ece0f5..ec4d586f6 100644 --- a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx @@ -17,17 +17,16 @@ const useCheckCodeValidity = ( !data.node?.template?.code?.value ) return; - if (data.type === "CustomComponent") 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 = ["CustomComponent", "Prompt"]; if ( currentCode !== thisNodesCode && - !componentsToIgnore.includes(data.node!.display_name) && + !componentsToIgnore.includes(data.type) && !(data.node?.edited ?? false) ) { setIsOutdated(true);