mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-11 02:20:08 +00:00
Fix closing saved workflows (#1049)
* Fix workflow save. Resolves #996 Resolves #1048 * Add test on closing tabs * Add test on closing open workflows in sidebar
This commit is contained in:
@@ -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 }))
|
||||
|
||||
Reference in New Issue
Block a user