update CheckCodeValidity
This commit is contained in:
parent
2055be160a
commit
740cb874c9
1 changed files with 2 additions and 3 deletions
|
|
@ -17,17 +17,16 @@ const useCheckCodeValidity = (
|
||||||
!data.node?.template?.code?.value
|
!data.node?.template?.code?.value
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
if (data.type === "CustomComponent") return;
|
|
||||||
const thisNodeTemplate = templates[data.type].template;
|
const thisNodeTemplate = templates[data.type].template;
|
||||||
// if the template does not have a code key
|
// if the template does not have a code key
|
||||||
// return
|
// return
|
||||||
if (!thisNodeTemplate.code) return;
|
if (!thisNodeTemplate.code) return;
|
||||||
const currentCode = thisNodeTemplate.code?.value;
|
const currentCode = thisNodeTemplate.code?.value;
|
||||||
const thisNodesCode = data.node!.template?.code?.value;
|
const thisNodesCode = data.node!.template?.code?.value;
|
||||||
const componentsToIgnore = ["Custom Component", "Prompt"];
|
const componentsToIgnore = ["CustomComponent", "Prompt"];
|
||||||
if (
|
if (
|
||||||
currentCode !== thisNodesCode &&
|
currentCode !== thisNodesCode &&
|
||||||
!componentsToIgnore.includes(data.node!.display_name) &&
|
!componentsToIgnore.includes(data.type) &&
|
||||||
!(data.node?.edited ?? false)
|
!(data.node?.edited ?? false)
|
||||||
) {
|
) {
|
||||||
setIsOutdated(true);
|
setIsOutdated(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue