progress-stream
progress-stream copied to clipboard
Fix incorrect check which always yields true
I might be overlooking something trivial here, but I can't see any way where length
is not a number?
It's initialized as 0, so when you pipe an HTTP stream to it, it'll still be 0, and it'll just fall back and not try to read the length from the headers. Surely this isn't how it was supposed to be? :-)
Hate to "bump", but any thoughts on this?
Don't mean to rush you but any chance of getting this addressed soon? ;)
For those of you looking for a workaround, you can initialize the progress-stream instance with the option{ length: 'any non-numeric value' }
. If your readable stream has a length to be read then this should work fine. If it doesn't have a readable length then I'm assuming this will break things.