diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 7a9924846..d131b145a 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -4100,7 +4100,7 @@ class AnnotationLayer { } getEditableAnnotations() { - return Array.from(this.#editableAnnotations.values()); + return this.#editableAnnotations.values(); } getEditableAnnotation(id) { diff --git a/src/display/editor/annotation_editor_layer.js b/src/display/editor/annotation_editor_layer.js index 16a118735..11c982fbf 100644 --- a/src/display/editor/annotation_editor_layer.js +++ b/src/display/editor/annotation_editor_layer.js @@ -416,8 +416,7 @@ class AnnotationEditorLayer { } // Show the annotations that were hidden in enable(). - const editables = annotationLayer.getEditableAnnotations(); - for (const editable of editables) { + for (const editable of annotationLayer.getEditableAnnotations()) { const { id } = editable.data; if (this.#uiManager.isDeletedAnnotationElement(id)) { editable.updateEdited({ deleted: true });