Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Commit b71bb46

Browse files
abdulapopoolathabti
authored andcommitted
Fix pause toggle (#707)
1 parent 8363875 commit b71bb46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/Verse/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,17 @@ class Verse extends Component {
7878
}
7979

8080
handlePlay(verse) {
81-
const { isPlaying, audioActions } = this.props;
81+
const { isPlaying, audioActions, iscurrentVerse } = this.props;
8282
const { pause, setAyah, play } = audioActions;
8383

8484
if (isPlaying) {
8585
pause();
8686
}
8787

88+
if (iscurrentVerse) {
89+
return;
90+
}
91+
8892
setAyah(verse.verseKey);
8993
play();
9094
}

0 commit comments

Comments
 (0)