mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Simplify the getAnnotationStorage
integration-test helper function
As can be seen [at MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries#parameters) the `Object.fromEntries` method accepts a `Map` directly, hence using the `Map.prototype.entries` method is superfluous here.
This commit is contained in:
parent
22657e2b6e
commit
60bf9b133a
1 changed files with 2 additions and 2 deletions
|
@ -466,8 +466,8 @@ async function getFirstSerialized(page, filter = undefined) {
|
|||
function getAnnotationStorage(page) {
|
||||
return page.evaluate(() =>
|
||||
Object.fromEntries(
|
||||
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable.map?.entries() ||
|
||||
[]
|
||||
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable
|
||||
.map || []
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue