Merge pull request #1091 from friday/1085

Add navigator.languages fallback for ios 9
This commit is contained in:
Sam Potts 2018-07-10 09:50:24 +10:00 committed by GitHub
commit ba33fd8277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ const captions = {
// * toggled: The real captions state
const languages = dedupe(
Array.from(navigator.languages || navigator.userLanguage).map(language => language.split('-')[0]),
Array.from(navigator.languages || navigator.language || navigator.userLanguage).map(language => language.split('-')[0]),
);
let language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase();