]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix #3626: updateLocale merge issue
authorChris Myers <cmyers2015@outlook.com>
Sat, 14 Oct 2017 23:28:34 +0000 (00:28 +0100)
committerIskren Chernev <iskren.chernev@gmail.com>
Sat, 11 Nov 2017 19:39:22 +0000 (21:39 +0200)
src/lib/locale/locales.js

index 4efebb8fff90a3c39a395f3faac54682ee86cad6..d3c565e7984fe7365d503f63cf746822ea03db13 100644 (file)
@@ -136,6 +136,12 @@ export function updateLocale(name, config) {
         if (locales[name] != null) {
             parentConfig = locales[name]._config;
         }
+        else {
+            locale = loadLocale(name);
+            if (locale != null) {
+                parentConfig = locale._config;
+            }
+        }
         config = mergeConfigs(parentConfig, config);
         locale = new Locale(config);
         locale.parentLocale = locales[name];