From ded13b14c9dac1684b95342dc1f796d251cfa00c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 22 Jul 2022 20:52:35 +0200 Subject: [PATCH] fix syntax --- src/components/ChaptersBar.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ChaptersBar.vue b/src/components/ChaptersBar.vue index ab8b9dd5..19bdbacd 100644 --- a/src/components/ChaptersBar.vue +++ b/src/components/ChaptersBar.vue @@ -70,9 +70,11 @@ export default { methods: { isCurrentChapter(chapters, index, playerPosition) { - if (index + 1 === chapters.length && playerPosition >= chapters[index].start) return true; - else if (index + 1 === chapters.length) return false; - else if (playerPosition >= chapters[index].start && playerPosition < chapters[index + 1].start) return true; + 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; }, },