From c37783d814a8d3dea2f8c12178cdd2f04fecad81 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 25 Dec 2024 11:30:17 +0100 Subject: [PATCH] fix: :art: simplify undefined test for filters --- src/store/settings.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/store/settings.ts b/src/store/settings.ts index da94329..9831bbf 100644 --- a/src/store/settings.ts +++ b/src/store/settings.ts @@ -9,12 +9,9 @@ export const useSettings = defineStore('settings', { return { filters: { - listened: - filters.listened === undefined ? true : filters.listened, - listening: - filters.listening === undefined ? true : filters.listening, - unlistened: - filters.unlistened === undefined ? true : filters.unlistened, + listened: !!filters.listened, + listening: !!filters.listening, + unlistened: !!filters.unlistened, }, } } catch {