1
0
Fork 0
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:
Calixte Denizet 2024-09-05 15:31:49 +02:00
parent e3fd62d726
commit 350e3e7b1c
2 changed files with 34 additions and 1 deletions

View file

@ -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();