mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-07 15:45:48 +02:00
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:
commit
8319fff9b6
@ -683,10 +683,10 @@ class XRef {
|
|||||||
// iterate over empty entries so we use the `in` operator instead of
|
// iterate over empty entries so we use the `in` operator instead of
|
||||||
// using for..of on entries() or a for with the array length.
|
// using for..of on entries() or a for with the array length.
|
||||||
for (const num in this.entries) {
|
for (const num in this.entries) {
|
||||||
if (!Object.hasOwn(this.entries, num)) {
|
const entry = this.entries[num];
|
||||||
|
if (!entry) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const entry = this.entries[num];
|
|
||||||
const ref = Ref.get(parseInt(num), entry.gen);
|
const ref = Ref.get(parseInt(num), entry.gen);
|
||||||
let obj;
|
let obj;
|
||||||
|
|
||||||
@ -695,7 +695,6 @@ class XRef {
|
|||||||
} catch {
|
} catch {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj instanceof BaseStream) {
|
if (obj instanceof BaseStream) {
|
||||||
obj = obj.dict;
|
obj = obj.dict;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user