1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Replace the forEach method in Dict with "proper" iteration support

This commit is contained in:
Jonas Jenwald 2024-11-16 11:51:09 +01:00
parent 691be77f65
commit 2c0cc48d1b
6 changed files with 19 additions and 30 deletions

View file

@ -688,11 +688,11 @@ class WorkerMessageHandler {
const infoObj = Object.create(null);
const xrefInfo = xref.trailer.get("Info") || null;
if (xrefInfo instanceof Dict) {
xrefInfo.forEach((key, value) => {
for (const [key, value] of xrefInfo) {
if (typeof value === "string") {
infoObj[key] = stringToPDFString(value);
}
});
}
}
newXrefInfo = {