Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrectly determining remaining #115

Closed
reduxdj opened this issue Feb 16, 2019 · 2 comments
Closed

incorrectly determining remaining #115

reduxdj opened this issue Feb 16, 2019 · 2 comments

Comments

@reduxdj
Copy link

reduxdj commented Feb 16, 2019

[remaining]: opts.max - 1,

      [remaining]: opts.n,
      [reset]: t,
      [total]: opts.max,
    }

remaining should be opts.n not opts.max

The debug statement is also incorrect

@scttcper
Copy link
Owner

i agree the debugger is wrong, but right there you do want the max - 1. The headers are adjusted again lower in the function look for ctx.set(remaining, n - 1);

@reduxdj
Copy link
Author

reduxdj commented Feb 16, 2019

ok, thanks for clarifying, the above change would have really no affect, since you are right, you are setting the remaining on the header down below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants