From b6b3e0b2b8645f99258b446245498f8c37c09b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=93=E8=80=90=E7=89=B9?= Date: Sat, 3 Aug 2019 17:21:33 +0800 Subject: [PATCH] fix https://github.com/Tencent/westore/issues/93 --- utils/diff.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/diff.js b/utils/diff.js index 3b27c2d..6e4e60d 100644 --- a/utils/diff.js +++ b/utils/diff.js @@ -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) { @@ -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) => {