Skip to content

Commit 5246068

Browse files
committed
Fixes pdf.js library source detection.
1 parent a63015a commit 5246068

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

web/pdfjs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
var pdfjsLib;
2020
if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) {
2121
pdfjsLib = window['pdfjs-dist/build/pdf'];
22-
} else if (typeof __non_webpack_require__ === 'function') {
23-
pdfjsLib = __non_webpack_require__('../build/pdf.js');
2422
} else {
25-
throw new Error('Neither `require` nor `window` found');
23+
pdfjsLib = __non_webpack_require__('../build/pdf.js');
2624
}
2725
module.exports = pdfjsLib;

0 commit comments

Comments
 (0)