1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Merge pull request #19278 from Snuffleupagus/more-Dict-iteration

Use `Dict` iteration more (PR 19051 follow-up)
This commit is contained in:
Tim van der Meij 2025-01-04 13:22:51 +01:00 committed by GitHub
commit 3e822399d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

View file

@ -923,8 +923,7 @@ class Catalog {
}
let prefs = null;
for (const key of obj.getKeys()) {
const value = obj.get(key);
for (const [key, value] of obj) {
let prefValue;
switch (key) {

View file

@ -1472,9 +1472,7 @@ class PDFDocument {
return shadow(this, "documentInfo", docInfo);
}
for (const key of infoDict.getKeys()) {
const value = infoDict.get(key);
for (const [key, value] of infoDict) {
switch (key) {
case "Title":
case "Author":

View file

@ -1133,8 +1133,7 @@ class PartialEvaluator {
// This array holds the converted/processed state data.
const gStateObj = [];
let promise = Promise.resolve();
for (const key of gState.getKeys()) {
const value = gState.get(key);
for (const [key, value] of gState) {
switch (key) {
case "Type":
break;