mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #18884 from hubgit/patch-1
Handle null parentElement for selection anchor
This commit is contained in:
commit
96bced7f5b
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue