Skip to content

Commit

Permalink
Merge pull request #26 from retejs/fix-async-removing-from-holder
Browse files Browse the repository at this point in the history
fix: prevent error on removing if the holder has been cleared
  • Loading branch information
Ni55aN authored Oct 12, 2024
2 parents 18e53b9 + 2b2707f commit 75bb5ca
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 75bb5ca

Please sign in to comment.