mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Use _.isFunction so ClojureScript doesn't break underscore
Clojurescript adds a call method to strings, so passing a string to _.invoke produces the wrong behavior.
This commit is contained in:
committed by
Gary Fredericks
parent
e58af52060
commit
2206092e25
@@ -218,7 +218,7 @@
|
||||
_.invoke = function(obj, method) {
|
||||
var args = slice.call(arguments, 2);
|
||||
return _.map(obj, function(value) {
|
||||
return (method.call ? method || value : value[method]).apply(value, args);
|
||||
return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user