Skip to content

Commit 8319fff

Browse files
Merge pull request #20663 from Snuffleupagus/xref-rm-Object-hasOwn
Remove `Object.hasOwn` usage from the `src/core/xref.js` file
2 parents c574694 + 0a91764 commit 8319fff

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/core/xref.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ class XRef {
683683
// iterate over empty entries so we use the `in` operator instead of
684684
// using for..of on entries() or a for with the array length.
685685
for (const num in this.entries) {
686-
if (!Object.hasOwn(this.entries, num)) {
686+
const entry = this.entries[num];
687+
if (!entry) {
687688
continue;
688689
}
689-
const entry = this.entries[num];
690690
const ref = Ref.get(parseInt(num), entry.gen);
691691
let obj;
692692

@@ -695,7 +695,6 @@ class XRef {
695695
} catch {
696696
continue;
697697
}
698-
699698
if (obj instanceof BaseStream) {
700699
obj = obj.dict;
701700
}

0 commit comments

Comments
 (0)