mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Update Prettier to version 2.0
Please note that these changes were done automatically, using `gulp lint --fix`. Given that the major version number was increased, there's a fair number of (primarily whitespace) changes; please see https://prettier.io/blog/2020/03/21/2.0.0.html In order to reduce the size of these changes somewhat, this patch maintains the old "arrowParens" style for now (once mozilla-central updates Prettier we can simply choose the same formatting, assuming it will differ here).
This commit is contained in:
parent
a4dd081d7b
commit
426945b480
145 changed files with 2005 additions and 2009 deletions
|
@ -100,7 +100,7 @@ class NetworkManager {
|
|||
xhr.responseType = "arraybuffer";
|
||||
|
||||
if (args.onError) {
|
||||
xhr.onerror = function(evt) {
|
||||
xhr.onerror = function (evt) {
|
||||
args.onError(xhr.status);
|
||||
};
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ class PDFNetworkStream {
|
|||
this._fullRequestReader.cancel(reason);
|
||||
}
|
||||
const readers = this._rangeRequestReaders.slice(0);
|
||||
readers.forEach(function(reader) {
|
||||
readers.forEach(function (reader) {
|
||||
reader.cancel(reason);
|
||||
});
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ class PDFNetworkStreamFullRequestReader {
|
|||
if (this._cachedChunks.length > 0) {
|
||||
return;
|
||||
}
|
||||
this._requests.forEach(function(requestCapability) {
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({ value: undefined, done: true });
|
||||
});
|
||||
this._requests = [];
|
||||
|
@ -370,7 +370,7 @@ class PDFNetworkStreamFullRequestReader {
|
|||
const exception = createResponseStatusError(status, url);
|
||||
this._storedError = exception;
|
||||
this._headersReceivedCapability.reject(exception);
|
||||
this._requests.forEach(function(requestCapability) {
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.reject(exception);
|
||||
});
|
||||
this._requests = [];
|
||||
|
@ -425,7 +425,7 @@ class PDFNetworkStreamFullRequestReader {
|
|||
cancel(reason) {
|
||||
this._done = true;
|
||||
this._headersReceivedCapability.reject(reason);
|
||||
this._requests.forEach(function(requestCapability) {
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({ value: undefined, done: true });
|
||||
});
|
||||
this._requests = [];
|
||||
|
@ -468,7 +468,7 @@ class PDFNetworkStreamRangeRequestReader {
|
|||
this._queuedChunk = chunk;
|
||||
}
|
||||
this._done = true;
|
||||
this._requests.forEach(function(requestCapability) {
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({ value: undefined, done: true });
|
||||
});
|
||||
this._requests = [];
|
||||
|
@ -503,7 +503,7 @@ class PDFNetworkStreamRangeRequestReader {
|
|||
|
||||
cancel(reason) {
|
||||
this._done = true;
|
||||
this._requests.forEach(function(requestCapability) {
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({ value: undefined, done: true });
|
||||
});
|
||||
this._requests = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue