Additional check in globalScope detections
This commit is contained in:
parent
08c6437196
commit
db7a770542
@ -21,9 +21,10 @@ if ((typeof PDFJSDev === 'undefined' ||
|
|||||||
!PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) &&
|
!PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) &&
|
||||||
(typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked)) {
|
(typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked)) {
|
||||||
|
|
||||||
var globalScope = (typeof window !== 'undefined') ? window :
|
var globalScope =
|
||||||
(typeof global !== 'undefined') ? global :
|
(typeof window !== 'undefined' && window.Math === Math) ? window :
|
||||||
(typeof self !== 'undefined') ? self : this;
|
(typeof global !== 'undefined' && global.Math === Math) ? global :
|
||||||
|
(typeof self !== 'undefined' && self.Math === Math) ? self : this;
|
||||||
|
|
||||||
var userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || '';
|
var userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || '';
|
||||||
var isAndroid = /Android/.test(userAgent);
|
var isAndroid = /Android/.test(userAgent);
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
import './compatibility';
|
import './compatibility';
|
||||||
import { ReadableStream } from '../../external/streams/streams-lib';
|
import { ReadableStream } from '../../external/streams/streams-lib';
|
||||||
|
|
||||||
var globalScope = (typeof window !== 'undefined') ? window :
|
var globalScope =
|
||||||
(typeof global !== 'undefined') ? global :
|
(typeof window !== 'undefined' && window.Math === Math) ? window :
|
||||||
(typeof self !== 'undefined') ? self : this;
|
(typeof global !== 'undefined' && global.Math === Math) ? global :
|
||||||
|
(typeof self !== 'undefined' && self.Math === Math) ? self : this;
|
||||||
|
|
||||||
var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
|
var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user