From 16d0077387a4ecd9981caf0d627fe080a6c50422 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 9 Oct 2025 09:25:43 +0200 Subject: [PATCH] [Editor] Avoid to have a null button in the DOM when there's no comment manager --- src/display/editor/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/display/editor/editor.js b/src/display/editor/editor.js index c1066a86a..c418c533e 100644 --- a/src/display/editor/editor.js +++ b/src/display/editor/editor.js @@ -1177,6 +1177,9 @@ class AnnotationEditor { } addStandaloneCommentButton() { + if (!this._uiManager.hasCommentManager()) { + return; + } if (this.#commentStandaloneButton) { if (this._uiManager.isEditingMode()) { this.#commentStandaloneButton.classList.remove("hidden");