Skip to content

Commit

Permalink
fix: undefined unread state
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jun 4, 2024
1 parent 6c73dec commit eafe32f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/src/components/feed-column/category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function FeedCategory({
}

const unread = useUnreadStore((state) =>
data.list.reduce((acc, cur) => state.data[cur.feedId] + acc, 0),
data.list.reduce((acc, cur) => (state.data[cur.feedId] || 0) + acc, 0),
)

const sortByUnreadFeedList = useUnreadStore((state) => data.list.sort((a, b) => (state.data[b.feedId] || 0) - (state.data[a.feedId] || 0)))
Expand Down

0 comments on commit eafe32f

Please sign in to comment.