From 7b7837a58466fbe42a065abadd81decf243572b9 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Mon, 17 Oct 2022 02:09:50 +0100 Subject: [PATCH] stop playback when no bgm loaded --- mamar-web/src/app/emu/PlaybackControls.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mamar-web/src/app/emu/PlaybackControls.tsx b/mamar-web/src/app/emu/PlaybackControls.tsx index 0d102e7..0ee1d56 100644 --- a/mamar-web/src/app/emu/PlaybackControls.tsx +++ b/mamar-web/src/app/emu/PlaybackControls.tsx @@ -132,6 +132,8 @@ export default function PlaybackControls() { const ambientSoundId = useId() if (!bgm) { + if (isPlaying) + setIsPlaying(false) return }