Skip to content

Commit 991ed36

Browse files
authored
Merge pull request #461 from BeliefYou8/UAVStackXingshengliLLL
Copy function bugFix in the helper.js
2 parents c384157 + de1c2ad commit 991ed36

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • com.creditease.uav.console/src/main/webapp/apphub/js/common

com.creditease.uav.console/src/main/webapp/apphub/js/common/helper.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ var JsonHelper={
140140
if (val instanceof Array ) {
141141
var ca=[];
142142
for (var i=0;i<val.length;i++) {
143-
ca[i]=this.clone(val[i]);
143+
if(val[i] && typeof val[i]==="object") {
144+
ca[i]=this.clone(val[i]);
145+
}
146+
else {
147+
ca[i]=val[i];
148+
}
144149
}
145150
co[key]=ca;
146151
}
147-
else if (typeof val == "object" ) {
152+
else if (typeof val === "object" ) {
148153
var cv=this.clone(val);
149154
co[key]=cv;
150155
}

0 commit comments

Comments
 (0)