diff --git a/src/components/Audioplayer/RepeatDropdown/index.js b/src/components/Audioplayer/RepeatDropdown/index.js index 6b58449c1..e95e86e64 100644 --- a/src/components/Audioplayer/RepeatDropdown/index.js +++ b/src/components/Audioplayer/RepeatDropdown/index.js @@ -61,7 +61,8 @@ class RepeatButton extends Component { value={repeat.from} onChange={(event) => { let to = parseInt(event.target.value, 10) + 3; - to = to < chapter.ayat ? to : chapter.ayat; + to = to < chapter.versesCount ? to : chapter.versesCount; + setRepeat({ ...repeat, from: parseInt(event.target.value, 10), @@ -71,7 +72,7 @@ class RepeatButton extends Component { > { array.reduce((options, ayah, index) => { - if (index + 1 < chapter.ayat) { // Exclude last verse + if (index + 1 < chapter.versesCount) { // Exclude last verse options.push(