Permalink
Browse files

Only overwrite if undefined

  • Loading branch information...
1 parent ea9eda8 commit 40117e39c6d542f1fbdcd80f27c4ff82d5c76420 @TheDeveloper committed Mar 23, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/abacus.js
View
@@ -21,7 +21,7 @@ var counters = function(opts){
counters.prototype.increment = function(counter, increment){
var self = this;
- if(!increment) increment = 1;
+ if(typeof increment == "undefined") increment = 1;
if(!self.counters[counter]) self.counters[counter] = 0;
self.counters[counter] += increment;
if(self.statsD && !self.flushPeriod)

0 comments on commit 40117e3

Please sign in to comment.