mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +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
|
@ -71,8 +71,8 @@ class ObjectLoader {
|
|||
this.refSet = new RefSet();
|
||||
// Setup the initial nodes to visit.
|
||||
const nodesToVisit = [];
|
||||
for (let i = 0, ii = keys.length; i < ii; i++) {
|
||||
const rawValue = dict.getRaw(keys[i]);
|
||||
for (const key of keys) {
|
||||
const rawValue = dict.getRaw(key);
|
||||
// Skip nodes that are guaranteed to be empty.
|
||||
if (rawValue !== undefined) {
|
||||
nodesToVisit.push(rawValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue