fix: layload errors if component not exist (#6683)

This commit is contained in:
gchust 2025-04-16 20:40:32 +08:00 committed by GitHub
parent 8d8229f8ca
commit 181c24c2a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -796,7 +796,7 @@ export function useDesignable() {
return component;
}
const c = get(components, component);
return c[LAZY_COMPONENT_KEY] ?? c;
return c?.[LAZY_COMPONENT_KEY] ?? c;
},
[get],
),