Skip to content

Commit

Permalink
Merge pull request #553 from mj1856/develop
Browse files Browse the repository at this point in the history
Ensure Intl response is valid
  • Loading branch information
mattjohnsonpint authored Oct 24, 2017
2 parents ba10fc8 + d12d11e commit 0682d33
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 0682d33

Please sign in to comment.