diff --git a/src/store/audioPlayer.ts b/src/store/audioPlayer.ts index b31a935321..643ae23585 100644 --- a/src/store/audioPlayer.ts +++ b/src/store/audioPlayer.ts @@ -41,10 +41,12 @@ export const audioPlayerStore = createPartialStore({ UNLOAD_AUDIO_BLOB: { action({ dispatch }, { blobId }: { blobId?: BlobId }) { - if (blobId === undefined || !audioElements.has(blobId)) { + let audioElement; + if (blobId === undefined || !(audioElement = audioElements.get(blobId))) { return; } dispatch("STOP_AUDIO_BLOB", { blobId }); + audioElement.src = ""; audioElements.delete(blobId); }, },