Skip to content

Commit

Permalink
Update confetti.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bwc9876 committed Apr 29, 2024
1 parent b7a96c2 commit 6526a57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/confetti.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,10 @@
global.removeEventListener('resize', onResize);
}

if (isLibCanvas && canvas && document.body.contains(canvas)) {
document.body.removeChild(canvas);
if (isLibCanvas && canvas) {
if (document.body.contains(canvas)) {
document.body.removeChild(canvas);
}
canvas = null;
initialized = false;
}
Expand Down

0 comments on commit 6526a57

Please sign in to comment.