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: '文本组件引用的字体不存在',