Don't overwrite L if it exists in export scope

This makes the module.exports fix more inline with previous behavior.
This commit is contained in:
David Murdoch 2016-08-16 14:56:14 -04:00 committed by GitHub
parent 8aa84ebf93
commit 4e631500ea
1 changed files with 6 additions and 2 deletions

View File

@ -525,11 +525,15 @@ var L = (function () {
// export to module.exports or window
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports.S2 = S2;
module.exports.L = L;
if (!module.exports.L) {
module.exports.L = L;
}
}
else {
global.S2 = S2;
global.L = L;
if (!global.L) {
global.L = L;
}
}
})(this);