mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Safer CommonJS detection... module.exports must be defined.
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
// Export the Underscore object for **CommonJS**, with backwards-compatibility
|
// Export the Underscore object for **CommonJS**, with backwards-compatibility
|
||||||
// for the old `require()` API. If we're not in CommonJS, add `_` to the
|
// for the old `require()` API. If we're not in CommonJS, add `_` to the
|
||||||
// global object.
|
// global object.
|
||||||
if (typeof module !== 'undefined') {
|
if (typeof module !== 'undefined' && module.exports) {
|
||||||
module.exports = _;
|
module.exports = _;
|
||||||
_._ = _;
|
_._ = _;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user