From 7f1164b6a62ef96088e2bfcc316b1dc8c69cf5c9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 15 Apr 2014 01:36:01 -0700 Subject: [PATCH] Remove `_.isObject` use from `_.findWhere` and `_.where`. --- lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index d4676f9c5..da83e7998 100644 --- a/lodash.js +++ b/lodash.js @@ -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)); } /*--------------------------------------------------------------------------*/