Skip to content

Commit

Permalink
Fix issue for Samsung Android Stock Browser
Browse files Browse the repository at this point in the history
Some Android Samsung Stock Browsers have window.chrome defined but no "app" property underneath.
  • Loading branch information
klipstein authored Jul 20, 2017
1 parent bc2ddce commit 9a556e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getLocale(locale) {
return global.Intl.DateTimeFormat().resolvedOptions && global.Intl.DateTimeFormat().resolvedOptions().locale
}

if (global.chrome && typeof global.chrome.app.getDetails === 'function') {
if (global.chrome && global.chrome.app && typeof global.chrome.app.getDetails === 'function') {
return global.chrome.app.getDetails().current_locale
}

Expand Down

0 comments on commit 9a556e8

Please sign in to comment.