Skip to content
Permalink
Browse files
CB-11522 Make utils.clone handle properties gracefully
Fix clone method so that it does not crash trying to clone unavailable property

This closes #134
  • Loading branch information
daserge authored and vladimir-kotikov committed Jul 11, 2016
1 parent 2fd4bcb commit d403ce434788ffe1937711d6ebcbcc837fcbcb14
Showing 1 changed file with 1 addition and 1 deletion.
@@ -108,7 +108,7 @@ utils.clone = function(obj) {

retVal = {};
for(i in obj){
if(!(i in retVal) || retVal[i] != obj[i]) {
if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined') {
retVal[i] = utils.clone(obj[i]);
}
}

0 comments on commit d403ce4

Please sign in to comment.