mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 07:19:41 +00:00
Fix workflow persistence (#3303)
This commit is contained in:
@@ -71,10 +71,10 @@ export function useWorkflowPersistence() {
|
||||
|
||||
// Setup watchers
|
||||
watch(
|
||||
() => workflowStore.activeWorkflow,
|
||||
(activeWorkflow) => {
|
||||
if (!activeWorkflow) return
|
||||
setStorageValue('Comfy.PreviousWorkflow', activeWorkflow.key)
|
||||
() => workflowStore.activeWorkflow?.key,
|
||||
(activeWorkflowKey) => {
|
||||
if (!activeWorkflowKey) return
|
||||
setStorageValue('Comfy.PreviousWorkflow', activeWorkflowKey)
|
||||
// When the activeWorkflow changes, the graph has already been loaded.
|
||||
// Saving the current state of the graph to the localStorage.
|
||||
persistCurrentWorkflow()
|
||||
|
||||
Reference in New Issue
Block a user