清理字体校验中的冗余空值判断

按 FontSource 的实际联合类型保留运行时字体资源校验。
This commit is contained in:
2026-09-12 14:54:49 +08:00
parent 2bfc870854
commit 3bcabe36fa
@@ -194,12 +194,7 @@ export function validateAssetSeparationResult(
}
if ('Text' in component) {
const font = component.Text.font;
if (
font !== null &&
font !== undefined &&
typeof font !== 'string' &&
!(font.Bound in state.font_assets)
) {
if (typeof font !== 'string' && !(font.Bound in state.font_assets)) {
issues.push({
code: 'missing-font',
message: '文本组件引用的字体不存在',