Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dntzhang authored Aug 3, 2019
1 parent 2bad952 commit b6b3e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function syncKeys(current, pre) {
const rootCurrentType = type(current)
const rootPreType = type(pre)
if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
if(Object.keys(current).length >= Object.keys(pre).length){
//if(Object.keys(current).length >= Object.keys(pre).length){
for (let key in pre) {
const currentValue = current[key]
if (currentValue === undefined) {
Expand All @@ -23,7 +23,7 @@ function syncKeys(current, pre) {
syncKeys(currentValue, pre[key])
}
}
}
//}
} else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
if (current.length >= pre.length) {
pre.forEach((item, index) => {
Expand Down

0 comments on commit b6b3e0b

Please sign in to comment.