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
Uncaught RangeError: Chance: Min cannot be greater than Max. #47
Comments
Can't reproduce. Could you share the test page you run gremlins on? Could you paste the detailed error stack when using the non-minified version of gremlins? |
same thing here |
Same comment: can you help me reproduce the bug? |
After rebuilding the js file with the
Looks like the error is being thrown by this method in chancejs:
Which means that the passed options here are invalid?
Happens every time we launch. Loading the module via requirejs and launching with After looking at the stack, please let me know if there are any specific variables you care for us to log. |
where is MAX_INT getting defined? |
I haven't traced exactly where it is getting defined, yet, but it's value is as the comment indicates: The issue definitely seems to be with chance's handling of picking a random item. For some reason at a given moment, Then, calling pick (with the count argument not defined), it is setting the max value to be -1: Which then leads to this error being called by chance's natural method, because the range is invalid: |
Thanks, you helped me find a bug in case a page contains an empty select. Should be fixed by #52. |
👍 awesome work, thanks for taking care of that. |
We got gremlins up and running (neat project, btw) but are encountering an error after a second or two of testing. I was hoping for some insight.
Here is a screenshot of my chrome dev console with the error:
Any suggestions?
The text was updated successfully, but these errors were encountered: