Skip to content

Commit

Permalink
adds clarifying comments. #120
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Apr 12, 2015
1 parent 5059051 commit a4e8368
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions front/public/js/alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ $(document).ready(function() {
success: function(res, status, xhr) {
console.log(' - - - - - - - - timerupsert res:')
console.log(res);
if(active && active.id === res.id){
active = res;
// only update the active timer if response is updating it
if(active && active.id === res.id) { // i.e. not for description updates
active = res; // see: https://github.com/ideaq/time/issues/120
db.set('active', res);
}
db.set('active', res)
saveTimer(res); // add it to our local db of timers
callback();
},
Expand Down

0 comments on commit a4e8368

Please sign in to comment.