Merge pull request #20104 from calixteman/fix_newpopup

[Editor] Only add a popup to an existing annotation if it exits
This commit is contained in:
Tim van der Meij 2025-07-18 19:34:03 +02:00 committed by GitHub
commit e4585c2452
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,7 @@ class AnnotationElement {
}
let popup = this.#popupElement?.popup || this.popup;
if (!popup && newPopup.text) {
if (!popup && newPopup?.text) {
this._createPopup(newPopup);
popup = this.#popupElement.popup;
}
@ -223,7 +223,7 @@ class AnnotationElement {
return;
}
popup.updateEdited(params);
if (newPopup.deleted) {
if (newPopup?.deleted) {
popup.remove();
this.#popupElement = null;
this.popup = null;