Boolean filter improvement alternative: TS upgrade (#4840)

* upgrade typescript and use new feature

* fix: typing error
This commit is contained in:
Dmitrii Kartashev
2024-07-25 19:31:59 -04:00
committed by GitHub
parent 50769b0b6f
commit 4437b9a557
6 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ function LoadMore({
}
return loadMoreItem
})
.filter(<T,>(n?: T): n is T => Boolean(n))
.filter(n => !!n)
}, [item.items, moderationOpts])
if (items.length === 0) return null