joris-calvat / locale-url-solver

0 stars 0 forks source link

Strange code #4

Open mbriziarelli opened 7 years ago

mbriziarelli commented 7 years ago

What is the purpose of

if(defaultLocale === null) {
 defaultLocale = name;
}

lines 28 to 31 ?

joris-calvat commented 7 years ago

if the default locale is not specified, it takes the first founded