Skip to content

Commit 953cbb4

Browse files
author
Guillaume Chau
committed
fix: shouldn't serialize VNodes, fixes #857
1 parent 38f183d commit 953cbb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ function replacer (key) {
187187
return encodeCache.cache(val, () => getCustomInstanceDetails(val))
188188
} else if (typeof val.render === 'function') {
189189
return encodeCache.cache(val, () => getCustomComponentDefinitionDetails(val))
190+
} else if (val.__proto__ && val.__proto__.constructor && val.__proto__.constructor.name === 'VNode') {
191+
return `[native VNode <${val.tag}>]`
190192
}
191193
} else if (Number.isNaN(val)) {
192194
return NAN

0 commit comments

Comments
 (0)