Fix workflow persistence (#3303)

This commit is contained in:
Chenlei Hu
2025-04-01 13:52:04 -04:00
committed by GitHub
parent e5abf765bd
commit 594fc5945c

View File

@@ -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()