Skip to content

Commit 56b3859

Browse files
committed
Empty VNodes should not render comments (to match preact no longer doing so)
1 parent 446b2df commit 56b3859

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function renderToString(vnode, context, opts, inner) {
5959
indentChar = typeof pretty==='string' ? pretty : '\t';
6060

6161
if (vnode==null) {
62-
return '<!---->';
62+
return '';
6363
}
6464

6565
// #text nodes

test/jsx.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ describe('jsx', () => {
135135
<div>
136136
<a></a>
137137
<b></b>
138-
<c>
139-
<!---->
140-
</c>
138+
<c></c>
141139
</div>
142140
`);
143141
});

0 commit comments

Comments
 (0)