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);
|
||||
}
|
||||
|
||||
if (!promises.has(name)) {
|
||||
promises.set(name, []);
|
||||
}
|
||||
promises.get(name).push(
|
||||
promises.getOrInsert(name, []).push(
|
||||
AnnotationFactory.create(
|
||||
xref,
|
||||
fieldRef,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user