Skip to content

Commit

Permalink
Update sound.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SprintingSnail69 authored Nov 1, 2024
1 parent 9b24c01 commit b888d00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function playSound(id) {
return;
}
const sound = document.getElementById(id);
stopAllSound()
sound.currentTime = 0;
sound.play();
}
Expand All @@ -83,4 +84,4 @@ document.addEventListener('keydown', (event) => {
if (event.key.toLowerCase() === 'escape') {
closeModal()
}
})
})

0 comments on commit b888d00

Please sign in to comment.