From: Isaac Cambron Date: Fri, 4 Apr 2014 17:43:54 +0000 (-0400) Subject: Merge pull request #1589 from ichernev/remove-node-global X-Git-Tag: 2.6.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ca72d1d11a9b4b895df91e71f2d334c272b0584;p=thirdparty%2Fmoment.git Merge pull request #1589 from ichernev/remove-node-global Do not export a global in node.js --- 1ca72d1d11a9b4b895df91e71f2d334c272b0584 diff --cc moment.js index e82227537,85a971e40..c4dbbdeea --- a/moment.js +++ b/moment.js @@@ -2447,12 -2445,11 +2447,11 @@@ // CommonJS module is defined if (hasModule) { module.exports = moment; - makeGlobal(true); } else if (typeof define === "function" && define.amd) { define("moment", function (require, exports, module) { - if (module.config && module.config() && module.config().noGlobal !== true) { - // If user provided noGlobal, he is aware of global - makeGlobal(module.config().noGlobal === undefined); + if (module.config && module.config() && module.config().noGlobal === true) { + // release the global variable + globalScope.moment = oldGlobalMoment; } return moment;