Skip to content

Commit

Permalink
Fix workflow save. Resolves #996 Resolves #1048
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne committed Sep 30, 2024
1 parent 0117964 commit 8fb10d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scripts/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,13 @@ export class ComfyWorkflow {

if (!this.path) {
// Saved new workflow, patch this instance
const oldKey = this.key
this.updatePath(path, null)

// Update workflowLookup: change the key from the old unsaved path to the new saved path
delete this.manager.workflowStore.workflowLookup[oldKey]
this.manager.workflowStore.workflowLookup[this.key] = this

await this.manager.loadWorkflows()
this.unsaved = false
this.manager.dispatchEvent(new CustomEvent('rename', { detail: this }))
Expand Down

0 comments on commit 8fb10d8

Please sign in to comment.