Browse Source

fix hydration coverage

dev
Evan You 8 years ago
parent
commit
8b46747dd6
  1. 11
      src/core/vdom/patch.js

11
src/core/vdom/patch.js

@ -397,17 +397,14 @@ export function createPatchFunction (backend) {
}
function assertNodeMatch (node, vnode) {
let match = true
if (!node) {
match = false
} else if (vnode.tag) {
match =
if (vnode.tag) {
return (
vnode.tag.indexOf('vue-component') === 0 ||
vnode.tag === nodeOps.tagName(node).toLowerCase()
)
} else {
match = _toString(vnode.text) === node.data
return _toString(vnode.text) === node.data
}
return match
}
return function patch (oldVnode, vnode, hydrating, removeOnly) {

Loading…
Cancel
Save