fix(editor): 修复 getTMagicAppPrimise 变量名拼写错误

Made-with: Cursor
This commit is contained in:
roymondchen 2026-04-07 20:30:39 +08:00
parent 334569e2d7
commit 99c8274a1e

View File

@ -233,7 +233,7 @@ export const initServiceEvents = (
((event: 'update:modelValue', value: MApp | null) => void), ((event: 'update:modelValue', value: MApp | null) => void),
{ editorService, codeBlockService, dataSourceService, depService }: Services, { editorService, codeBlockService, dataSourceService, depService }: Services,
) => { ) => {
let getTMagicAppPrimise: Promise<TMagicCore | undefined> | null = null; let getTMagicAppPromise: Promise<TMagicCore | undefined> | null = null;
const getTMagicApp = async (): Promise<TMagicCore | undefined> => { const getTMagicApp = async (): Promise<TMagicCore | undefined> => {
const stage = await getStage(); const stage = await getStage();
@ -246,11 +246,11 @@ export const initServiceEvents = (
return renderer.runtime.getApp?.(); return renderer.runtime.getApp?.();
} }
if (getTMagicAppPrimise) { if (getTMagicAppPromise) {
return getTMagicAppPrimise; return getTMagicAppPromise;
} }
getTMagicAppPrimise = new Promise<TMagicCore | undefined>((resolve) => { getTMagicAppPromise = new Promise<TMagicCore | undefined>((resolve) => {
// 设置 10s 超时 // 设置 10s 超时
const timeout = globalThis.setTimeout(() => { const timeout = globalThis.setTimeout(() => {
resolve(void 0); resolve(void 0);
@ -264,7 +264,7 @@ export const initServiceEvents = (
}); });
}); });
return getTMagicAppPrimise; return getTMagicAppPromise;
}; };
const updateStageNodes = (nodes: MComponent[]) => { const updateStageNodes = (nodes: MComponent[]) => {