From 1c96cb8862caf734c9e0fdb6a757660c6e7e5bed Mon Sep 17 00:00:00 2001 From: Gioele Masini Date: Wed, 11 May 2016 11:21:56 +0200 Subject: [PATCH] Added context to compatibility.js to have 'use strict' directive in our context only --- web/compatibility.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/compatibility.js b/web/compatibility.js index 1119a2742..2874bcb12 100644 --- a/web/compatibility.js +++ b/web/compatibility.js @@ -14,7 +14,8 @@ */ /* globals VBArray, PDFJS */ -'use strict'; +(function compatibilityWrapper() { + 'use strict'; // Initializing PDFJS global object here, it case if we need to change/disable // some PDF.js features, e.g. range requests @@ -591,3 +592,5 @@ if (typeof PDFJS === 'undefined') { configurable: true }); })(); + +}).call((typeof window === 'undefined') ? this : window);