Skip to content

Commit

Permalink
fix: prevent error on removing if the holder has been cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Oct 12, 2024
1 parent 148ac5d commit 2b2707f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export class Content {
}

remove(element: HTMLElement) {
this.holder.removeChild(element)
if (this.holder.contains(element)) {
this.holder.removeChild(element)
}
}
}

0 comments on commit 2b2707f

Please sign in to comment.