From 2b20e012bb9cda2d101af2b60dc42a4df5185dce Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 26 Mar 2026 20:53:02 +0100 Subject: [PATCH] Avoid exception when cloning a page with some modified annotations Some tests will come later. --- src/core/editor/pdf_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/editor/pdf_editor.js b/src/core/editor/pdf_editor.js index 3b2cc7929..615010c9a 100644 --- a/src/core/editor/pdf_editor.js +++ b/src/core/editor/pdf_editor.js @@ -1979,7 +1979,7 @@ class PDFEditor { } const newAnnotations = - this.#newAnnotationsParams?.newAnnotationsByPage.get(pageIndex); + this.#newAnnotationsParams?.newAnnotationsByPage?.get(pageIndex); if (newAnnotations) { const { handler, task, imagesPromises } = this.#newAnnotationsParams; const changes = new RefSetCache();