From e68e73794e3f1f68572040ed2c352f4f23ed25bb Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 23 Jul 2022 14:40:16 +0200 Subject: [PATCH] fix bad syntax --- src/components/ChaptersBar.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/ChaptersBar.vue b/src/components/ChaptersBar.vue index 5679813d..d777c74e 100644 --- a/src/components/ChaptersBar.vue +++ b/src/components/ChaptersBar.vue @@ -71,11 +71,10 @@ export default { methods: { isCurrentChapter(chapters, index, playerPosition) { if (index + 1 == chapters.length) { - if (playerPosition >= chapters[index].start) return true; - else return false; - } else if (playerPosition >= chapters[index].start && playerPosition < chapters[index + 1].start) - return true; - return false; + return playerPosition >= chapters[index].start; + } else { + return playerPosition >= chapters[index].start && playerPosition < chapters[index + 1].start; + } }, }, };