From c61d17baa73ceefe36046475dc6dac970592d524 Mon Sep 17 00:00:00 2001 From: GitBluub Date: Thu, 18 Jan 2024 01:56:07 +0100 Subject: [PATCH] fix ? --- front/components/Play/PartitionMagic.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/components/Play/PartitionMagic.tsx b/front/components/Play/PartitionMagic.tsx index b738c29..2961aa5 100644 --- a/front/components/Play/PartitionMagic.tsx +++ b/front/components/Play/PartitionMagic.tsx @@ -86,7 +86,7 @@ const PartitionMagic = ({ React.useEffect(() => { // In practice mode, no sound is played so just act as the piano is loaded - if (playType == 'practice') { + if (playType === 'practice' || playType === undefined) { setIsPianoLoaded(true); return; } @@ -191,7 +191,7 @@ const PartitionMagic = ({ React.useEffect(() => { if (!shouldPlay) return; - if (!piano.current || !isPianoLoaded) return; + if (!isPianoLoaded || melodySound.current) return; if (!data || data?.cursors.length === 0) return; getCursorToPlay( data!.cursors,