]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Revert "Merge pull request #3344 from yiminghe:module_require"
authorIskren Chernev <iskren.chernev@gmail.com>
Thu, 15 Sep 2016 07:05:32 +0000 (00:05 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 21 Sep 2016 03:06:55 +0000 (20:06 -0700)
This reverts commit bb6a30e3e9a1b2022b68794b30dd68ed561aa847, reversing
changes made to d4c5f8e8b503a590e6661a3ae5510b92f1c43631.

src/lib/locale/locales.js

index ba64626eb8f42d6e75fa939769298b9666a20ea0..abdafcea7c2be2c181c52f78cb449e7bf50926c7 100644 (file)
@@ -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);