mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Disables fetch when ReadableStream is not available.
This commit is contained in:
parent
3cff7da0e7
commit
cd95b426c7
2 changed files with 4 additions and 2 deletions
|
@ -80,7 +80,8 @@ function initializePDFJS(callback) {
|
|||
var PDFFetchStream = modules[3].PDFFetchStream;
|
||||
|
||||
// Set network stream class for unit tests.
|
||||
if (typeof Response !== 'undefined' && 'body' in Response.prototype) {
|
||||
if (typeof Response !== 'undefined' && 'body' in Response.prototype &&
|
||||
typeof ReadableStream !== 'undefined') {
|
||||
displayApi.setPDFNetworkStreamClass(PDFFetchStream);
|
||||
} else {
|
||||
displayApi.setPDFNetworkStreamClass(PDFNetworkStream);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue