Remove the API/Worker version warning message in TESTING mode

The warning messages turn out to be more annoying than helpful when looking at the `console` during tests, so let's just remove them.
This commit is contained in:
Jonas Jenwald 2019-09-01 16:43:58 +02:00
parent 10165c070e
commit 229f6f34d1
2 changed files with 7 additions and 9 deletions

View file

@ -395,8 +395,8 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId,
apiVersion: (typeof PDFJSDev !== 'undefined' ?
PDFJSDev.eval('BUNDLE_VERSION') : null),
apiVersion: typeof PDFJSDev !== 'undefined' && !PDFJSDev.test('TESTING') ?
PDFJSDev.eval('BUNDLE_VERSION') : null,
source: { // Only send the required properties, and *not* the entire object.
data: source.data,
url: source.url,