Fix object coercion.

This commit is contained in:
John-David Dalton
2017-04-16 15:30:42 -05:00
parent e2941dda3b
commit aa5e1b2fe0
7 changed files with 20 additions and 10 deletions

View File

@@ -15,7 +15,9 @@
* // => true
*/
function someValues(object, predicate) {
const props = Object.keys(Object(object))
object = Object(object)
const props = Object.keys(object)
for (const key of props) {
if (predicate(object[key], key, object)) {
return true