Skip to content

Commit

Permalink
Ensure Intl response is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Oct 24, 2017
1 parent ba10fc8 commit d12d11e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moment-timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
// use Intl API when available and returning valid time zone
try {
var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (intlName){
if (intlName && intlName.length > 3) {
var name = names[normalizeName(intlName)];
if (name) {
return name;
Expand Down

0 comments on commit d12d11e

Please sign in to comment.