mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-11 09:35:49 +02:00
Remove type === "arraybuffer" support from the fetchData helper function
After the previous patch there's no longer any call-site using that type.
This commit is contained in:
parent
8ba83e73fa
commit
722f1ffbc6
@ -44,8 +44,6 @@ async function fetchData(url, type = "text") {
|
|||||||
throw new Error(response.statusText);
|
throw new Error(response.statusText);
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "arraybuffer":
|
|
||||||
return response.arrayBuffer();
|
|
||||||
case "blob":
|
case "blob":
|
||||||
return response.blob();
|
return response.blob();
|
||||||
case "bytes":
|
case "bytes":
|
||||||
@ -71,7 +69,6 @@ async function fetchData(url, type = "text") {
|
|||||||
case "bytes":
|
case "bytes":
|
||||||
resolve(new Uint8Array(request.response));
|
resolve(new Uint8Array(request.response));
|
||||||
return;
|
return;
|
||||||
case "arraybuffer":
|
|
||||||
case "blob":
|
case "blob":
|
||||||
case "json":
|
case "json":
|
||||||
resolve(request.response);
|
resolve(request.response);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user