Skip to content

Commit a758fb2

Browse files
committed
fix: empty error at jsx #4349
close #4349
1 parent 39c866e commit a758fb2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

components/_util/props-util/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,10 @@ export function isEmptyContent(c) {
339339

340340
export function isEmptyElement(c) {
341341
return (
342-
c.type === Comment ||
343-
(c.type === Fragment && c.children.length === 0) ||
344-
(c.type === Text && c.children.trim() === '')
342+
c &&
343+
(c.type === Comment ||
344+
(c.type === Fragment && c.children.length === 0) ||
345+
(c.type === Text && c.children.trim() === ''))
345346
);
346347
}
347348

v2-doc

0 commit comments

Comments
 (0)