mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Ensure _.callback doesn't error if provided a nullish func argument and a thisArg.
This commit is contained in:
@@ -7790,7 +7790,7 @@
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
var type = typeof func;
|
||||
if (type == 'function' || func == null) {
|
||||
return (typeof thisArg == 'undefined' || !('prototype' in func)) &&
|
||||
return (typeof thisArg == 'undefined' || !(func && 'prototype' in func)) &&
|
||||
func || baseCreateCallback(func, thisArg, argCount);
|
||||
}
|
||||
// handle "_.pluck" and "_.where" style callback shorthands
|
||||
|
||||
Reference in New Issue
Block a user