From 8b46747dd63228f3d48030f26d414bba46ad3888 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 4 Aug 2016 22:20:13 -0400 Subject: [PATCH] fix hydration coverage --- src/core/vdom/patch.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/core/vdom/patch.js b/src/core/vdom/patch.js index 7464f3ad..799e508b 100644 --- a/src/core/vdom/patch.js +++ b/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) {