Skip to content

Commit

Permalink
Clear starting node cache on clear (#978)
Browse files Browse the repository at this point in the history
* Clear starting node cache on clear

* Always clear on clear

* Update src/renderer/contexts/GlobalNodeState.tsx

Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>

Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
  • Loading branch information
joeyballentine and RunDevelopment committed Sep 16, 2022
1 parent 3215153 commit 323a591
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/contexts/GlobalNodeState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ interface GlobalProviderProps {
export const GlobalProvider = memo(
({ children, reactFlowWrapper }: React.PropsWithChildren<GlobalProviderProps>) => {
const { sendAlert, sendToast, showAlert } = useContext(AlertBoxContext);
const { schemata, functionDefinitions } = useContext(BackendContext);
const { schemata, functionDefinitions, backend } = useContext(BackendContext);
const { useStartupTemplate } = useContext(SettingsContext);

const [nodeChanges, addNodeChanges, nodeChangesRef] = useChangeCounter();
Expand Down Expand Up @@ -1028,6 +1028,7 @@ export const GlobalProvider = memo(
});
outputDataActions.delete(id);
addInputDataChanges();
backend.clearNodeCacheIndividual(id).catch((error) => log.error(error));
},
[modifyNode, addInputDataChanges, outputDataActions]
);
Expand Down

0 comments on commit 323a591

Please sign in to comment.