mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Space): Text is not defined in SSR (#11549)
This commit is contained in:
parent
ff14e7585b
commit
c05c31772a
@ -1,10 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
|
Comment,
|
||||||
CSSProperties,
|
CSSProperties,
|
||||||
defineComponent,
|
defineComponent,
|
||||||
ExtractPropTypes,
|
ExtractPropTypes,
|
||||||
Fragment,
|
Fragment,
|
||||||
PropType,
|
PropType,
|
||||||
|
Text,
|
||||||
type VNode,
|
type VNode,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { createNamespace } from '../utils';
|
import { createNamespace } from '../utils';
|
||||||
@ -47,7 +49,7 @@ function filterEmpty(children: VNode[] = []) {
|
|||||||
(c) =>
|
(c) =>
|
||||||
!(
|
!(
|
||||||
c &&
|
c &&
|
||||||
((typeof Comment !== 'undefined' && c.type === Comment) ||
|
(c.type === Comment ||
|
||||||
(c.type === Fragment && c.children?.length === 0) ||
|
(c.type === Fragment && c.children?.length === 0) ||
|
||||||
(c.type === Text && (c.children as string).trim() === ''))
|
(c.type === Text && (c.children as string).trim() === ''))
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user