[Editor] Avoid to have a null button in the DOM when there's no comment manager

This commit is contained in:
Calixte Denizet 2025-10-09 09:25:43 +02:00
parent 8ba18075f2
commit 16d0077387

View File

@ -1177,6 +1177,9 @@ class AnnotationEditor {
} }
addStandaloneCommentButton() { addStandaloneCommentButton() {
if (!this._uiManager.hasCommentManager()) {
return;
}
if (this.#commentStandaloneButton) { if (this.#commentStandaloneButton) {
if (this._uiManager.isEditingMode()) { if (this._uiManager.isEditingMode()) {
this.#commentStandaloneButton.classList.remove("hidden"); this.#commentStandaloneButton.classList.remove("hidden");