Permalink
Browse files

fix: 兼容子表的情况,避免json转字符串的情况出现死循环

  • Loading branch information...
1 parent 0b58f2b commit 361d04c57360d649c4262e3005762b5296fe8106 liuyk committed Dec 7, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 js/gridCompCreate.js
@@ -603,11 +603,12 @@ const repairContent = function(){
*/
const objCompare = function(rootObj, objAry) {
var aryLen = objAry.length;
- var rootStr = JSON.stringify(rootObj);
+ // var rootStr = JSON.stringify(rootObj);
var matchNum = 0;
for(var i=0; i<aryLen; i++){
- var compareStr = JSON.stringify(objAry[i]);
- matchNum += (rootStr == compareStr) ? 1 : 0;
+ // var compareStr = JSON.stringify(objAry[i]);
+ var compareObj = objAry[i];
+ matchNum += (rootObj == compareObj) ? 1 : 0;
}
return (matchNum>0) ? true : false;
};

0 comments on commit 361d04c

Please sign in to comment.