Skip to content

Commit 3f33d35

Browse files
committed
handle special null case when hydrating
1 parent 3a99a74 commit 3f33d35

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/runtime/internal/dom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function claim_text(nodes, data) {
162162
for (let i = 0; i < nodes.length; i += 1) {
163163
const node = nodes[i];
164164
if (node.nodeType === 3) {
165-
node.data = data;
165+
node.data = '' + data;
166166
return nodes.splice(i, 1)[0];
167167
}
168168
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<p></p>
1+
<p>null</p>
22
<p>undefined</p>

0 commit comments

Comments
 (0)