From 60bf9b133ac0e184e8a271c1a3e4560c2ae49d6c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 9 Apr 2025 13:42:22 +0200 Subject: [PATCH] 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. --- test/integration/test_utils.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/test_utils.mjs b/test/integration/test_utils.mjs index 97081516b..db1f31995 100644 --- a/test/integration/test_utils.mjs +++ b/test/integration/test_utils.mjs @@ -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 || [] ) ); }