Merge pull request #8646 from yurydelendik/issue-8645

Fixes pdf.js library source detection.
This commit is contained in:
Yury Delendik 2017-07-13 15:20:17 -05:00 committed by GitHub
commit c673b6fee1

View File

@ -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;