fix(Space): Text is not defined in SSR (#11549)
This commit is contained in:
@@ -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() === ''))
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user