diff --git a/src/frontend/package.json b/src/frontend/package.json index 1d9beeb99b52..312e52051ecb 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -56,5 +56,5 @@ "last 1 safari version" ] }, - "proxy": "http://localhost:7860" + "proxy": "http://backend:7860" } diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 990fd458b25d..ddb9524ee110 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -19,18 +19,19 @@ export default function GenericNode({ selected: boolean; }) { const { setErrorData } = useContext(alertContext); - const showError = useRef(true) + const showError = useRef(true); const { types, deleteNode } = useContext(typesContext); const Icon = nodeIcons[types[data.type]]; if (!Icon) { console.log(data); - 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 - } + 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; + } return; } @@ -45,7 +46,9 @@ export default function GenericNode({