From 63fe6ec68be444082cb16aac76d6b2fe9ee5724f Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 6 Mar 2025 20:10:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(stage):=20=E9=98=B2=E6=AD=A2runtime?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/stage/src/StageRender.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/stage/src/StageRender.ts b/packages/stage/src/StageRender.ts index 658b1acc..bb96501b 100644 --- a/packages/stage/src/StageRender.ts +++ b/packages/stage/src/StageRender.ts @@ -56,6 +56,10 @@ export default class StageRender extends EventEmitter { public getMagicApi = () => ({ onPageElUpdate: (el: HTMLElement) => this.emit('page-el-update', el), onRuntimeReady: (runtime: Runtime) => { + if (this.runtime) { + return; + } + this.runtime = runtime; // @ts-ignore globalThis.runtime = runtime;