bugfix in equalsToDefault.

This commit is contained in:
James Chen
2018-04-04 17:32:29 +08:00
parent ebef9795a0
commit ee3afd4403
+1 -8
View File
@@ -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) {
}