Skip to content

Commit 16d0077

Browse files
committed
[Editor] Avoid to have a null button in the DOM when there's no comment manager
1 parent 8ba1807 commit 16d0077

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/display/editor/editor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,9 @@ class AnnotationEditor {
11771177
}
11781178

11791179
addStandaloneCommentButton() {
1180+
if (!this._uiManager.hasCommentManager()) {
1181+
return;
1182+
}
11801183
if (this.#commentStandaloneButton) {
11811184
if (this._uiManager.isEditingMode()) {
11821185
this.#commentStandaloneButton.classList.remove("hidden");

0 commit comments

Comments
 (0)