We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40f8edd commit 75505ccCopy full SHA for 75505cc
PDFMergerBase.js
@@ -162,6 +162,9 @@ export default class PDFMergerBase {
162
163
// see https://developer.mozilla.org/en-US/docs/Web/API/URL
164
if (input instanceof URL) {
165
+ if (typeof fetch === 'undefined') {
166
+ throw new Error('fetch is not defined. You need to use a polyfill for this to work in Node.js.')
167
+ }
168
const res = await fetch(input)
169
const aBuffer = await res.arrayBuffer()
170
return new Uint8Array(aBuffer)
0 commit comments