mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Remove _.isObject use from _.omit and _.pick.
This commit is contained in:
@@ -7176,7 +7176,7 @@
|
|||||||
* // => { 'name': 'fred' }
|
* // => { 'name': 'fred' }
|
||||||
*/
|
*/
|
||||||
function omit(object, predicate, thisArg) {
|
function omit(object, predicate, thisArg) {
|
||||||
if (!isObject(object)) {
|
if (object == null) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if (typeof predicate == 'function') {
|
if (typeof predicate == 'function') {
|
||||||
@@ -7241,7 +7241,7 @@
|
|||||||
* // => { 'name': 'fred' }
|
* // => { 'name': 'fred' }
|
||||||
*/
|
*/
|
||||||
function pick(object, predicate, thisArg) {
|
function pick(object, predicate, thisArg) {
|
||||||
if (!isObject(object)) {
|
if (object == null) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return basePick(object, typeof predicate == 'function'
|
return basePick(object, typeof predicate == 'function'
|
||||||
|
|||||||
Reference in New Issue
Block a user