diff --git a/cocos2d/core/platform/instantiate-jit.js b/cocos2d/core/platform/instantiate-jit.js index 4b1cdcf2ee..f891f5af1a 100644 --- a/cocos2d/core/platform/instantiate-jit.js +++ b/cocos2d/core/platform/instantiate-jit.js @@ -162,14 +162,7 @@ function equalsToDefault (def, value) { (def.constructor === Object && value.constructor === Object) ) { try { - if (CC_JSB) { - //FIXME: JSON.stringify will take lots of time for compare object at runtime on JSB. - // We need to consider a new way for checking whether two objects are equal. - return false; - } - else { - return JSON.stringify(def) === JSON.stringify(value); - } + return Array.isArray(def) && Array.isArray(value) && def.length === 0 && value.length === 0; } catch (e) { }