fix: correctly set selected step editor code when reverting to snapshot (#6131)
This commit is contained in:
@@ -115,6 +115,19 @@
|
||||
if (snapshot) {
|
||||
flowStore.val = snapshot
|
||||
refreshStateStore(flowStore)
|
||||
|
||||
if ($currentEditor) {
|
||||
const module = getModule($currentEditor.stepId, snapshot)
|
||||
if (module) {
|
||||
if ($currentEditor.type === 'script' && module.value.type === 'rawscript') {
|
||||
$currentEditor.editor.setCode(module.value.content)
|
||||
} else if ($currentEditor.type === 'iterator' && module.value.type === 'forloopflow') {
|
||||
$currentEditor.editor.setCode(
|
||||
module.value.iterator.type === 'javascript' ? module.value.iterator.expr : ''
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
showModuleDiff(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user