diff --git a/src/pdf.js b/src/pdf.js index fd113efa8..69670e5a9 100644 --- a/src/pdf.js +++ b/src/pdf.js @@ -15,7 +15,11 @@ * limitations under the License. */ -var PDFJS = {}; +// Initializing PDFJS global object (if still undefined) +if (typeof PDFJS === 'undefined') { + (typeof window !== 'undefined' ? window : this).PDFJS = {}; +} + //#if BUNDLE_VERSION //#expand PDFJS.version = '__BUNDLE_VERSION__'; //#endif