React18 #23

Merged
DrMint merged 30 commits from react18 into main 2022-05-15 08:21:37 +00:00
1 changed files with 1 additions and 3 deletions
Showing only changes of commit 16891dfad1 - Show all commits

View File

@ -369,8 +369,7 @@ function filterItems(
showSecondaryItems: boolean,
items: Immutable<Props["items"]>
): Immutable<Props["items"]> {
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<Props["items"]>;
}
function sortBy(