Fix a local variable reference in BucketRateLimit.when.

ReferenceError: age is not defined	snowflake.js:265:7
        BucketRateLimit.prototype.when	snowflake/proxy/build/snowflake.js:265:7
        ProxyPair.prototype.flush	snowflake/proxy/build/snowflake.js:558:63
        bind/<	snowflake/proxy/build/snowflake.js:10:56
        ProxyPair.prototype.onClientToRelayMessage	snowflake/proxy/build/snowflake.js:495:14
        bind/<	snowflake/proxy/build/snowflake.js:10:56
This commit is contained in:
David Fifield 2018-12-04 17:00:56 -07:00
parent 9545be1c9f
commit 5817c257c1

View file

@ -174,7 +174,7 @@ class BucketRateLimit
# How many seconds in the future will the limit expire? # How many seconds in the future will the limit expire?
when: -> when: ->
age() @age()
(@amount - @capacity) / (@capacity / @time) (@amount - @capacity) / (@capacity / @time)
isLimited: -> isLimited: ->