Fix set workflow attribute in node

This commit is contained in:
space-nuko
2023-05-20 23:22:56 -05:00
parent 3aad259869
commit 1014afc9ab
3 changed files with 15 additions and 7 deletions

View File

@@ -32,9 +32,10 @@ export default class ComfyGraph extends LGraph {
workflowID: WorkflowInstID | null = null;
get workflow(): ComfyWorkflow | null {
if (this.workflowID == null)
const workflowID = (this.getRootGraph() as ComfyGraph)?.workflowID;
if (workflowID == null)
return null;
return workflowState.getWorkflow(this.workflowID)
return workflowState.getWorkflow(workflowID)
}
constructor(workflowID?: WorkflowInstID) {