1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

[Editor] Don't remove elements from the draw layer after it has been destroyed

Fixes issue #17379.
This commit is contained in:
Calixte Denizet 2023-12-05 22:01:49 +01:00
parent 319e85449e
commit f7fec8c6d7
4 changed files with 84 additions and 1 deletions

View file

@ -185,6 +185,9 @@ class DrawLayer {
}
remove(id) {
if (this.#parent === null) {
return;
}
this.#mapping.get(id).remove();
this.#mapping.delete(id);
}