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

[bugfix] min and max bug with iteratee and infinities fixed. Fixes #2688 #2724

Closed
wants to merge 3 commits into from
Closed

[bugfix] min and max bug with iteratee and infinities fixed. Fixes #2688 #2724

wants to merge 3 commits into from

Conversation

bayneri
Copy link

@bayneri bayneri commented Jan 30, 2018

'is first element min/max borders (infinities)' check simplified. these changes also fixed the bug between iteratee and Infinity/-Infinity.

#2688

@bayneri
Copy link
Author

bayneri commented Jan 31, 2018

Can anyone explain these errors?

zip
Died on test #5 at /home/travis/build/jashkenas/underscore/test/arrays.js:254:9
at Object. (/home/travis/build/jashkenas/underscore/test/arrays.js:567:2)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17): Cannot read property 'length' of null
null != undefined
max
can handle null/undefined
-Infinity != null
min
can handle null/undefined
null != Infinity

@sakarisson
Copy link

Does the error come from the fact that you use != instead of !==?

@bayneri
Copy link
Author

bayneri commented Apr 17, 2018

@sakarisson i don't think so but i'll try that

@bayneri bayneri closed this Mar 5, 2019
@bayneri bayneri deleted the min-max-infinite-fix branch January 30, 2021 23:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants