From 52460687ca32f9ba2f327dd8fb71cc25035e6847 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 13 Jul 2017 14:57:39 -0500 Subject: [PATCH] Fixes pdf.js library source detection. --- web/pdfjs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/pdfjs.js b/web/pdfjs.js index 1248f753b..a191e6439 100644 --- a/web/pdfjs.js +++ b/web/pdfjs.js @@ -19,9 +19,7 @@ var pdfjsLib; if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) { pdfjsLib = window['pdfjs-dist/build/pdf']; -} else if (typeof __non_webpack_require__ === 'function') { - pdfjsLib = __non_webpack_require__('../build/pdf.js'); } else { - throw new Error('Neither `require` nor `window` found'); + pdfjsLib = __non_webpack_require__('../build/pdf.js'); } module.exports = pdfjsLib;