fix: initial path when changing path of draft only scripts and flows (#3400)
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
@@ -192,6 +192,7 @@
|
||||
if (newFlow) {
|
||||
dispatch('saveInitial', $pathStore)
|
||||
} else if (savedFlow?.draft_only && $pathStore !== initialPath) {
|
||||
initialPath = $pathStore
|
||||
goto(`/flows/edit/${$pathStore}?selected=${getSelectedId()}`)
|
||||
}
|
||||
sendUserToast('Saved as draft')
|
||||
|
||||
@@ -368,7 +368,6 @@
|
||||
: script.concurrency_key
|
||||
}
|
||||
})
|
||||
initialPath = script.path
|
||||
}
|
||||
await DraftService.createDraft({
|
||||
workspace: $workspaceStore!,
|
||||
@@ -387,6 +386,7 @@
|
||||
} as NewScriptWithDraft
|
||||
|
||||
if (initialPath == '' || (savedScript?.draft_only && script.path !== initialPath)) {
|
||||
initialPath = script.path
|
||||
goto(`/scripts/edit/${script.path}`)
|
||||
}
|
||||
sendUserToast('Saved as draft')
|
||||
|
||||
Reference in New Issue
Block a user