mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-12 16:24:04 +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);
|
||||
}
|
||||
|
||||
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