From 6d118ec35e6e6f954938a485178748f1bb8bdd8a Mon Sep 17 00:00:00 2001
From: Jakob Ackermann <jakob.ackermann@overleaf.com>
Date: Mon, 5 Jul 2021 17:28:00 +0100
Subject: [PATCH 2/2] [misc] do not bundle NodeJS stream backend

---
 src/pdf.js | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/pdf.js b/src/pdf.js
index 4ccf2c1a7..7058c7a46 100644
--- a/src/pdf.js
+++ b/src/pdf.js
@@ -32,12 +32,7 @@ let pdfjsDisplayAPICompatibility = require('./display/api_compatibility.js');
 
 if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
   const isNodeJS = require('./shared/is_node.js');
-  if (isNodeJS()) {
-    let PDFNodeStream = require('./display/node_stream.js').PDFNodeStream;
-    pdfjsDisplayAPI.setPDFNetworkStreamFactory((params) => {
-      return new PDFNodeStream(params);
-    });
-  } else {
+  if (!isNodeJS()) {
     let PDFNetworkStream = require('./display/network.js').PDFNetworkStream;
     let PDFFetchStream;
     if (pdfjsDisplayDisplayUtils.isFetchSupported()) {
-- 
2.17.1

