From: Iskren Chernev Date: Thu, 15 Sep 2016 07:05:32 +0000 (-0700) Subject: Revert "Merge pull request #3344 from yiminghe:module_require" X-Git-Tag: 2.15.1~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8042c657f41419bb1370d03b7140e8e0c152ae4;p=thirdparty%2Fmoment.git Revert "Merge pull request #3344 from yiminghe:module_require" This reverts commit bb6a30e3e9a1b2022b68794b30dd68ed561aa847, reversing changes made to d4c5f8e8b503a590e6661a3ae5510b92f1c43631. --- diff --git a/src/lib/locale/locales.js b/src/lib/locale/locales.js index ba64626eb..abdafcea7 100644 --- a/src/lib/locale/locales.js +++ b/src/lib/locale/locales.js @@ -48,10 +48,10 @@ function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && - module && module.require) { + module && module.exports) { try { oldLocale = globalLocale._abbr; - module.require('./locale/' + name); + require('./locale/' + name); // because defineLocale currently also sets the global locale, we // want to undo that for lazy loaded locales getSetGlobalLocale(oldLocale);