mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Restore the URL.createObjectURL
check to the createObjectURL
utility function (issue 8344)
This is a regression from commit 3888a993b1
.
It turns out the even though we have a `URL` polyfill, it's still dependent on the existence of native `URL.{createObjectURL, revokeObjectURL}` functions.
Since no such thing exists in Node.js, our `createObjectURL` utility function breaks there.
This commit is contained in:
parent
e3d0cd4913
commit
ee09336f32
1 changed files with 1 additions and 1 deletions
|
@ -1199,7 +1199,7 @@ var createObjectURL = (function createObjectURLClosure() {
|
|||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
|
||||
return function createObjectURL(data, contentType, forceDataSchema = false) {
|
||||
if (!forceDataSchema) {
|
||||
if (!forceDataSchema && URL.createObjectURL) {
|
||||
var blob = createBlob(data, contentType);
|
||||
return URL.createObjectURL(blob);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue