mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[Editor] Avoid to throw when an highlight annotation is resetted
This commit is contained in:
parent
e3fd62d726
commit
350e3e7b1c
2 changed files with 34 additions and 1 deletions
|
@ -1796,7 +1796,7 @@ class AnnotationEditor {
|
|||
resetAnnotationElement(annotation) {
|
||||
const { firstChild } = annotation.container;
|
||||
if (
|
||||
firstChild.nodeName === "DIV" &&
|
||||
firstChild?.nodeName === "DIV" &&
|
||||
firstChild.classList.contains("annotationContent")
|
||||
) {
|
||||
firstChild.remove();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue