knockout / tko

🥊 Technical Knockout – The Monorepo for Knockout.js (4.0+)
http://www.tko.io
Other
274 stars 34 forks source link

arrayFirst returns undefined if found value is falsy #63

Closed mbest closed 6 years ago

mbest commented 6 years ago

For example, "", 0, null.

https://github.com/knockout/tko/blob/4f302f55d075bacad8ece3b440f0803aa95e6574/packages/tko.utils/src/array.js#L22

brianmhunt commented 6 years ago

Thanks @mbest ; that seems a. clearly the wrong behaviour here, and b. like something I would have done in response to some tests failing. Will look into it.