Handle null parentElement for selection anchor
This commit is contained in:
parent
c6d01caf65
commit
e97e9c93d6
@ -299,7 +299,7 @@ class TextLayerBuilder {
|
||||
anchor = anchor.parentNode;
|
||||
}
|
||||
|
||||
const parentTextLayer = anchor.parentElement.closest(".textLayer");
|
||||
const parentTextLayer = anchor.parentElement?.closest(".textLayer");
|
||||
const endDiv = this.#textLayers.get(parentTextLayer);
|
||||
if (endDiv) {
|
||||
endDiv.style.width = parentTextLayer.style.width;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user