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:
parent
691be77f65
commit
2c0cc48d1b
6 changed files with 19 additions and 30 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue