mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-04-21 03:48:03 +00:00
fix(editor): 修复 getTMagicAppPrimise 变量名拼写错误
Made-with: Cursor
This commit is contained in:
parent
334569e2d7
commit
99c8274a1e
@ -233,7 +233,7 @@ export const initServiceEvents = (
|
||||
((event: 'update:modelValue', value: MApp | null) => void),
|
||||
{ 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 stage = await getStage();
|
||||
@ -246,11 +246,11 @@ export const initServiceEvents = (
|
||||
return renderer.runtime.getApp?.();
|
||||
}
|
||||
|
||||
if (getTMagicAppPrimise) {
|
||||
return getTMagicAppPrimise;
|
||||
if (getTMagicAppPromise) {
|
||||
return getTMagicAppPromise;
|
||||
}
|
||||
|
||||
getTMagicAppPrimise = new Promise<TMagicCore | undefined>((resolve) => {
|
||||
getTMagicAppPromise = new Promise<TMagicCore | undefined>((resolve) => {
|
||||
// 设置 10s 超时
|
||||
const timeout = globalThis.setTimeout(() => {
|
||||
resolve(void 0);
|
||||
@ -264,7 +264,7 @@ export const initServiceEvents = (
|
||||
});
|
||||
});
|
||||
|
||||
return getTMagicAppPrimise;
|
||||
return getTMagicAppPromise;
|
||||
};
|
||||
|
||||
const updateStageNodes = (nodes: MComponent[]) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user