From a9358bf3ce71dfe47653a26617d301bb4f167f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 19:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=AD=97=E4=BD=93=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=E6=A0=A1=E9=AA=8C=E8=AE=BF=E9=97=AE=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对外部状态中的空字体引用返回正常校验结果而不是抛出异常。 --- .../src/features/ui-editor/requisites.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/features/ui-editor/requisites.ts b/apps/ai-game-creator-shell/src/features/ui-editor/requisites.ts index 759792923..14a77a269 100644 --- a/apps/ai-game-creator-shell/src/features/ui-editor/requisites.ts +++ b/apps/ai-game-creator-shell/src/features/ui-editor/requisites.ts @@ -194,7 +194,12 @@ export function validateAssetSeparationResult( } if ('Text' in component) { const font = component.Text.font; - if (typeof font !== 'string' && !(font.Bound in state.font_assets)) { + if ( + font !== null && + font !== undefined && + typeof font !== 'string' && + !(font.Bound in state.font_assets) + ) { issues.push({ code: 'missing-font', message: '文本组件引用的字体不存在',