Skip to content

Commit

Permalink
fix(vdom): remove unnecessary sameVnode condition
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 authored and aJean committed Aug 19, 2020
1 parent 86891bf commit 07169ff
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/vdom/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,13 @@ export const emptyNode = new VNode('', {}, [])

const hooks = ['create', 'activate', 'update', 'remove', 'destroy']

function childrenIgnored (vnode) {
return vnode && vnode.data && vnode.data.domProps && (
vnode.data.domProps.innerHTML || vnode.data.domProps.textContent
)
}

function sameVnode (a, b) {
return (
a.key === b.key && (
(
a.tag === b.tag &&
a.isComment === b.isComment &&
isDef(a.data) === isDef(b.data) &&
!childrenIgnored(a) && !childrenIgnored(b) &&
sameInputType(a, b)
) || (
isTrue(a.isAsyncPlaceholder) &&
Expand Down

0 comments on commit 07169ff

Please sign in to comment.