mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Ensure func is a function before querying the weakmap. [closes #1319]
This commit is contained in:
committed by
John-David Dalton
parent
a5e2caf40b
commit
2e50d11be5
@@ -3998,7 +3998,7 @@
|
||||
* @returns {*} Returns the metadata for `func`.
|
||||
*/
|
||||
var getData = !metaMap ? noop : function(func) {
|
||||
return metaMap.get(func);
|
||||
return typeof func == 'function' ? metaMap.get(func) : undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user