mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Remove _.isObject use from _.findWhere and _.where.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user