mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-02 20:37:21 +02:00
Merge pull request #20703 from Snuffleupagus/#collectFieldObjects-getOrInsert
Use `Map.prototype.getOrInsert()` in the `#collectFieldObjects` method
This commit is contained in:
commit
8189ca358c
@ -1892,10 +1892,7 @@ class PDFDocument {
|
|||||||
orphanFields.put(fieldRef, parentRef);
|
orphanFields.put(fieldRef, parentRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!promises.has(name)) {
|
promises.getOrInsert(name, []).push(
|
||||||
promises.set(name, []);
|
|
||||||
}
|
|
||||||
promises.get(name).push(
|
|
||||||
AnnotationFactory.create(
|
AnnotationFactory.create(
|
||||||
xref,
|
xref,
|
||||||
fieldRef,
|
fieldRef,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user