Fix crash if node is removed mid run

This commit is contained in:
pythongosssss 2023-03-29 19:03:38 +01:00
parent 6f72c4c6ff
commit 00c1ec498f

View File

@ -618,7 +618,7 @@ class ComfyApp {
api.addEventListener("executed", ({ detail }) => { api.addEventListener("executed", ({ detail }) => {
this.nodeOutputs[detail.node] = detail.output; this.nodeOutputs[detail.node] = detail.output;
const node = this.graph.getNodeById(detail.node); const node = this.graph.getNodeById(detail.node);
if (node.onExecuted) { if (node?.onExecuted) {
node.onExecuted(detail.output); node.onExecuted(detail.output);
} }
}); });