Skip to content

Commit

Permalink
refactor: contine diffing while last children and next children share…
Browse files Browse the repository at this point in the history
… the same reference
  • Loading branch information
yuche committed Apr 1, 2018
1 parent 85a9831 commit 93aec1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/nerv/src/vdom/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ export function patchChildren (
context: object,
isSvg: boolean
) {
if (lastChildren === nextChildren) {
return
}
// @TODO: is a better way to compatible with react-router?
// if (lastChildren === nextChildren) {
// return
// }
const lastChildrenIsArray = isArray(lastChildren)
const nextChildrenIsArray = isArray(nextChildren)
if (lastChildrenIsArray && nextChildrenIsArray) {
Expand Down

0 comments on commit 93aec1b

Please sign in to comment.