Merge pull request #8761 from tobytailor/master

Fallback to plain object for globalScope.
This commit is contained in:
Jonas Jenwald 2017-08-08 19:48:33 +02:00 committed by GitHub
commit 11ea21265d

View File

@ -24,7 +24,8 @@ if ((typeof PDFJSDev === 'undefined' ||
var globalScope =
(typeof window !== 'undefined' && window.Math === Math) ? window :
(typeof global !== 'undefined' && global.Math === Math) ? global :
(typeof self !== 'undefined' && self.Math === Math) ? self : this;
(typeof self !== 'undefined' && self.Math === Math) ? self :
(typeof this !== 'undefined' && this.Math === Math) ? this : {};
var userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || '';
var isAndroid = /Android/.test(userAgent);