[Editor] Only add a popup to an existing annotation if it exits
It fixes the ink integration test "must update an existing annotation".
This commit is contained in:
parent
23bd705cea
commit
6d7e0e7025
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user