Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sapk committed Jun 18, 2016
2 parents fe3e9ac + 82b0fe7 commit e8cf67b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion www/assets/js/sofia.db.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,24 @@ S.db.fiches = {
}
});
$.each(n.events, function(id,val){
/*
if ($.inArray(val,ret.events) === -1) { //Not found
ret.events.push(val);
}
*/
var found = false;
var searching = JSON.stringify(val);
$.each(ret.events, function(i,v){
if(!found && JSON.stringify(v) === searching ){
found = true;
}
});
if(!found){
ret.events.push(val);
}
});
ret.events.sort(function(x, y){ //Order
return x.timestamp - y.timestamp;
return x.timestamp - y.timestamp;
});
/* */
ret._rev=o._rev;
Expand Down

0 comments on commit e8cf67b

Please sign in to comment.