From: Iskren Chernev Date: Sat, 31 Jan 2015 09:50:08 +0000 (-0800) Subject: Fix lazy loading locales for node.js X-Git-Tag: 2.10.2~15^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b398e8a849977524e6f3c03def09ffe67428b5dc;p=thirdparty%2Fmoment.git Fix lazy loading locales for node.js --- diff --git a/src/lib/locale/locales.js b/src/lib/locale/locales.js index d085b271d..5f8c90fb6 100644 --- a/src/lib/locale/locales.js +++ b/src/lib/locale/locales.js @@ -43,7 +43,7 @@ function loadLocale(name) { if (!locales[name] && typeof module !== 'undefined' && module && module.exports) { try { - oldLocale = moment.locale(); + oldLocale = globalLocale._abbr; require('./locale/' + name); // because defineLocale currently also sets the global locale, we // want to undo that for lazy loaded locales