Ensure getFuncName returns a string.

This commit is contained in:
jdalton
2015-07-07 08:15:34 -07:00
committed by John-David Dalton
parent 816f37bdc5
commit caae7a5879

View File

@@ -4009,7 +4009,7 @@
* @returns {string} Returns the function name. * @returns {string} Returns the function name.
*/ */
function getFuncName(func) { function getFuncName(func) {
var result = func.name, var result = (func.name + ''),
array = realNames[result], array = realNames[result],
length = array ? array.length : 0; length = array ? array.length : 0;
@@ -12487,7 +12487,7 @@
baseForOwn(LazyWrapper.prototype, function(func, methodName) { baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var lodashFunc = lodash[methodName]; var lodashFunc = lodash[methodName];
if (lodashFunc) { if (lodashFunc) {
var key = lodashFunc.name, var key = (lodashFunc.name + ''),
names = realNames[key] || (realNames[key] = []); names = realNames[key] || (realNames[key] = []);
names.push({ 'name': methodName, 'func': lodashFunc }); names.push({ 'name': methodName, 'func': lodashFunc });