Skip to content

Commit

Permalink
fix: shouldn't serialize VNodes, fixes vuejs#857
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau authored and sp1ker committed Aug 24, 2020
1 parent 255df9c commit 2029699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ function replacer (key) {
return encodeCache.cache(val, () => getCustomInstanceDetails(val))
} else if (typeof val.render === 'function') {
return encodeCache.cache(val, () => getCustomComponentDefinitionDetails(val))
} else if (val.__proto__ && val.__proto__.constructor && val.__proto__.constructor.name === 'VNode') {
return `[native VNode <${val.tag}>]`
}
} else if (Number.isNaN(val)) {
return NAN
Expand Down

0 comments on commit 2029699

Please sign in to comment.