Skip to content

Commit

Permalink
Increment/Decrement Counter bug fix (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Knoot authored Sep 23, 2021
1 parent 6cee2f2 commit 9c7d801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WagoAnalytics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ end
local wagoPrototype = {}

function wagoPrototype:IncrementCounter(name, increment)
return self.SetCounter((self.counters[name] or 0) + (increment or 1))
return self:SetCounter(name, (self.counters[name] or 0) + (increment or 1))
end

function wagoPrototype:DecrementCounter(name, decrement)
return self.SetCounter((self.counters[name] or 0) - (decrement or 1))
return self:SetCounter(name, (self.counters[name] or 0) - (decrement or 1))
end

function wagoPrototype:SetCounter(name, value)
Expand Down

0 comments on commit 9c7d801

Please sign in to comment.