diff --git a/packages/project-editor/flow/runtime-viewer/viewer.tsx b/packages/project-editor/flow/runtime-viewer/viewer.tsx index 7e9953e4..3f729db8 100644 --- a/packages/project-editor/flow/runtime-viewer/viewer.tsx +++ b/packages/project-editor/flow/runtime-viewer/viewer.tsx @@ -528,6 +528,7 @@ export const Canvas = observer( } const lvglCreateInProgress = + !runtime.isStopped && this.props.flowContext.flowState && this.props.flowContext.flowState.flow instanceof ProjectEditor.PageClass && diff --git a/packages/project-editor/flow/runtime/remote-runtime.ts b/packages/project-editor/flow/runtime/remote-runtime.ts index f65fd039..50adcb07 100644 --- a/packages/project-editor/flow/runtime/remote-runtime.ts +++ b/packages/project-editor/flow/runtime/remote-runtime.ts @@ -1371,10 +1371,11 @@ export abstract class DebuggerConnectionBase { runtime.error = errorMessage; }); - runtime.stopRuntime(true); - const { flowIndex, flowState } = this.getFlowState(flowStateIndex); + + runtime.stopRuntime(true); + if (!flowState) { console.error("UNEXPECTED!"); return;