mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-07 14:57:34 +02:00
Use Map.prototype.getOrInsert() in the #collectFieldObjects method
This commit is contained in:
parent
f548a159d6
commit
210c969c4c
@ -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