-
Notifications
You must be signed in to change notification settings - Fork 221
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
Invalid array length #166
Comments
Getting this as well |
The reason for this problem is probably the total parameter except the problem, the value is NaN, you can check if this is the problem. |
Currently experiencing this exact issue. |
content-length isn't guaranteed so it could be 0 and make bug. set a value if content-length is 0. // content-length isn't guaranteed so it could be 0 and make bug. set a value if content-length is 0.
const len = parseInt(response.headers["content-length"], 10) || 100000000;
const bar = new ProgressBar("downloading [:bar] :rate/bps :percent :etas", {
complete: "=",
incomplete: " ",
width: 20,
total: len,
});
response.on("data", (chunk) => {
bar.tick(chunk.length);
}); it need validation for the better error info tips: |
I confirm the bug in 2.0.3 in case total is 0 :
|
The index of array must be integer. The input |
The input `:total` value is float, but the output `:current` value is more than `:total` value. The input `:total` is nagative integer or zero, but the output rendering failed. Closes visionmedia#177, visionmedia#166
causes:
The text was updated successfully, but these errors were encountered: