mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Replace unnecessary bind(this)
and var self = this
statements with arrow functions in remaining src/core/
files
This commit is contained in:
parent
0c99429291
commit
ebaa22478c
5 changed files with 47 additions and 68 deletions
|
@ -334,12 +334,12 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
|||
};
|
||||
rangeReader.read().then(readChunk, reject);
|
||||
});
|
||||
promise.then(function (data) {
|
||||
promise.then((data) => {
|
||||
if (this.aborted) {
|
||||
return; // ignoring any data after abort
|
||||
}
|
||||
this.onReceiveData({ chunk: data, begin, });
|
||||
}.bind(this));
|
||||
});
|
||||
// TODO check errors
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue