This commit is contained in:
GitBluub
2024-01-18 01:56:07 +01:00
committed by Clément Le Bihan
parent be8867e12f
commit c61d17baa7

View File

@@ -86,7 +86,7 @@ const PartitionMagic = ({
React.useEffect(() => { React.useEffect(() => {
// In practice mode, no sound is played so just act as the piano is loaded // 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); setIsPianoLoaded(true);
return; return;
} }
@@ -191,7 +191,7 @@ const PartitionMagic = ({
React.useEffect(() => { React.useEffect(() => {
if (!shouldPlay) return; if (!shouldPlay) return;
if (!piano.current || !isPianoLoaded) return; if (!isPianoLoaded || melodySound.current) return;
if (!data || data?.cursors.length === 0) return; if (!data || data?.cursors.length === 0) return;
getCursorToPlay( getCursorToPlay(
data!.cursors, data!.cursors,