fix bad syntax

This commit is contained in:
Bnyro 2022-07-23 14:40:16 +02:00
parent 6f0897a263
commit e68e73794e

View File

@ -71,11 +71,10 @@ export default {
methods: { methods: {
isCurrentChapter(chapters, index, playerPosition) { isCurrentChapter(chapters, index, playerPosition) {
if (index + 1 == chapters.length) { if (index + 1 == chapters.length) {
if (playerPosition >= chapters[index].start) return true; return playerPosition >= chapters[index].start;
else return false; } else {
} else if (playerPosition >= chapters[index].start && playerPosition < chapters[index + 1].start) return playerPosition >= chapters[index].start && playerPosition < chapters[index + 1].start;
return true; }
return false;
}, },
}, },
}; };