Merge pull request #20663 from Snuffleupagus/xref-rm-Object-hasOwn

Remove `Object.hasOwn` usage from the `src/core/xref.js` file
This commit is contained in:
Jonas Jenwald 2026-02-16 20:38:18 +01:00 committed by GitHub
commit 8319fff9b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -683,10 +683,10 @@ class XRef {
// iterate over empty entries so we use the `in` operator instead of
// using for..of on entries() or a for with the array length.
for (const num in this.entries) {
if (!Object.hasOwn(this.entries, num)) {
const entry = this.entries[num];
if (!entry) {
continue;
}
const entry = this.entries[num];
const ref = Ref.get(parseInt(num), entry.gen);
let obj;
@ -695,7 +695,6 @@ class XRef {
} catch {
continue;
}
if (obj instanceof BaseStream) {
obj = obj.dict;
}