From 678aec9890ba4c78d8d7fb21db48bf5a22443085 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Mon, 29 Sep 2025 16:41:15 +0200 Subject: [PATCH] [Editor] Avoid an error when getting the editors telemetry data --- src/display/annotation_storage.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/display/annotation_storage.js b/src/display/annotation_storage.js index 468e81508..0e864ba90 100644 --- a/src/display/annotation_storage.js +++ b/src/display/annotation_storage.js @@ -226,10 +226,12 @@ class AnnotationStorage { let numberOfDeletedComments = 0; for (const value of this.#storage.values()) { if (!(value instanceof AnnotationEditor)) { - if (value.popup.deleted) { - numberOfDeletedComments += 1; - } else if (value.popup) { - numberOfEditedComments += 1; + if (value.popup) { + if (value.popup.deleted) { + numberOfDeletedComments += 1; + } else { + numberOfEditedComments += 1; + } } continue; }