Merge pull request #1927 from omnivore-app/fix/filter-highlights

Filter library items with no highlights from the highlights mode
This commit is contained in:
Jackson Harper 2023-03-17 16:49:42 +08:00 committed by GitHub
commit cf1e89db2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,9 @@ export function HighlightItemsLayout(
useEffect(() => {
dispatchList({
type: 'RESET',
items: props.items,
items: props.items.filter(
(item) => item.node.highlights && item.node.highlights.length > 0
),
})
}, [props.items])