feat(types): support custom values from app.config.ts (#863)

This commit is contained in:
Benjamin Canac
2023-11-17 18:48:50 +01:00
committed by GitHub
parent bcc46b87f5
commit 7339324355
26 changed files with 132 additions and 57 deletions

View File

@@ -39,7 +39,7 @@ export function hexToRgb (hex: string) {
export function getSlotsChildren (slots: any) {
let children = slots.default?.()
if (children.length) {
if (children?.length) {
children = children.flatMap(c => {
if (typeof c.type === 'symbol') {
if (typeof c.children === 'string') {
@@ -53,7 +53,7 @@ export function getSlotsChildren (slots: any) {
return c
}).filter(Boolean)
}
return children
return children || []
}
/**