From 9e97fc732be584e9f981336a00c4dcdaf27acbff Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 27 Jan 2023 19:05:02 +0100 Subject: [PATCH] Improve the `switch` statement at the feed filter --- src/components/FeedPage.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/FeedPage.vue b/src/components/FeedPage.vue index 06d5fa32..94c19348 100644 --- a/src/components/FeedPage.vue +++ b/src/components/FeedPage.vue @@ -99,13 +99,13 @@ export default { } }, shouldShowVideo(video) { - switch (this.selectedFilter) { - case "all": - return true; + switch (this.selectedFilter.toLowerCase()) { + case "shorts": + return video.isShort; case "videos": return !video.isShort; default: - return video.isShort; + return true; } }, onFilterChange() {