mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Use more for...of
loops in the code-base
Most, if not all, of this code is old enough to predate the general availability of `for...of` iteration.
This commit is contained in:
parent
4e58dabb32
commit
60f6272ed9
16 changed files with 70 additions and 101 deletions
|
@ -551,14 +551,14 @@ class XRef {
|
|||
}
|
||||
}
|
||||
// reading XRef streams
|
||||
for (let i = 0, ii = xrefStms.length; i < ii; ++i) {
|
||||
this.startXRefQueue.push(xrefStms[i]);
|
||||
for (const xrefStm of xrefStms) {
|
||||
this.startXRefQueue.push(xrefStm);
|
||||
this.readXRef(/* recoveryMode */ true);
|
||||
}
|
||||
// finding main trailer
|
||||
let trailerDict;
|
||||
for (let i = 0, ii = trailers.length; i < ii; ++i) {
|
||||
stream.pos = trailers[i];
|
||||
for (const trailer of trailers) {
|
||||
stream.pos = trailer;
|
||||
const parser = new Parser({
|
||||
lexer: new Lexer(stream),
|
||||
xref: this,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue