Skip to content

Commit

Permalink
Fix moment#3626 further refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyers committed Oct 19, 2017
1 parent 61a556f commit 75be0d4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/lib/locale/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,11 @@ export function defineLocale (name, config) {

export function updateLocale(name, config) {
if (config != null) {
var locale, parentConfig = baseConfig;
var locale, tmpLocale, parentConfig = baseConfig;
// MERGE
if (locales[name] != null) {
parentConfig = locales[name]._config;
}
else {
locale = loadLocale(name);
if (locale != null) {
parentConfig = locale._config;
}
tmpLocale = locales[name] || loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
locale = new Locale(config);
Expand Down

0 comments on commit 75be0d4

Please sign in to comment.