Remove _.isObject use from _.findWhere and _.where.

This commit is contained in:
John-David Dalton
2014-04-15 01:36:01 -07:00
parent 2174f10db5
commit 7f1164b6a6

View File

@@ -3994,7 +3994,7 @@
* // => { 'name': 'fred', 'age': 40, 'employer': 'slate' }
*/
function findWhere(collection, source) {
return find(collection, isObject(source) ? source : {});
return find(collection, Object(source));
}
/**
@@ -4858,7 +4858,7 @@
* // => ['barney', 'fred']
*/
function where(collection, source) {
return filter(collection, isObject(source) ? source : {});
return filter(collection, Object(source));
}
/*--------------------------------------------------------------------------*/