From 16891dfad1244fe5bc1f261193245a69b80d5ce4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Fri, 13 May 2022 19:23:34 +0200 Subject: [PATCH] Fixed a bug, subitems were always showing --- src/pages/library/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 004760a..2e9696b 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -369,8 +369,7 @@ function filterItems( showSecondaryItems: boolean, items: Immutable ): Immutable { - const fileredItems = [...items] as Props["items"]; - fileredItems.filter((item) => { + return [...items].filter((item) => { if (!showSubitems && !item.attributes?.root_item) return false; if ( showSubitems && @@ -385,7 +384,6 @@ function filterItems( if (!item.attributes?.primary && !showSecondaryItems) return false; return true; }); - return fileredItems as Immutable; } function sortBy(