js报错uncaught typeerror: cannot read property ‘length’ of null
先上问题代码:
fmt_customerLaber : function (column,row){
var cuslaber ="";
if( row.cusLabelList != null && row.cusLabelList.length > 1){
var len = row.cusLabelList.length -1;
for (var i=len;i>=0;i--){
cuslaber += row.cusLabelList[i].labelName+",";
}
console.log(cuslaber);
return cuslaber.substring(0, cuslaber.lastIndexOf(','));;
} else{
return '无';
}
}