Allow use versions for pdf.js script (i.e. - pdf.js?2412313)

This commit is contained in:
Vladimir Bloshchitsyn 2017-04-18 15:07:09 +03:00
parent 5ad3611cc4
commit 319ea0f350

View File

@ -1064,7 +1064,7 @@ var PDFWorker = (function PDFWorkerClosure() {
if (typeof PDFJSDev !== 'undefined' &&
PDFJSDev.test('PRODUCTION && !(MOZCENTRAL || FIREFOX)') &&
pdfjsFilePath) {
return pdfjsFilePath.replace(/(\.(?:min\.)?js)$/i, '.worker$1');
return pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i, '.worker$1$2');
}
error('No PDFJS.workerSrc specified');
}