Fallback to plain object for globalScope.

This commit is contained in:
Tobias Schneider 2017-08-07 18:46:51 -07:00 committed by Tobias Schneider
parent a1d88d8e2e
commit da44d10af1

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);