]> git.ipfire.org Git - thirdparty/moment.git/commit
[misc] Print console warning when setting non-existent locales (#4085)
authorasulaiman <asulaimanificent@gmail.com>
Fri, 2 Mar 2018 18:54:40 +0000 (13:54 -0500)
committerKunal Marwaha <marwahaha@berkeley.edu>
Fri, 2 Mar 2018 18:54:40 +0000 (10:54 -0800)
commit780e83025354d1dbcc74425458f180581b25a317
treeabac81eff4b0661b4b2bc4d9ae2ba42ec41334bb
parentf1ca7201b2c1c09a056751be8a0b327d5abafd55
[misc] Print console warning when setting non-existent locales (#4085)

* Dont silently fail setting new locale when it isnt available

Right now if the new locale being set is not available then it fails silently and just uses the existing global locale. A console warning would be useful to notify the user of such a failure.

* added missing semicolon

* Added console warn check.

* Fixed if condition.

* Add space
src/lib/locale/locales.js