Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Fix error when community proxy not available
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksellen committed Jan 18, 2024
1 parent 23f117e commit e61ce32
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/communityFeed/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export const useCommunityFeedService = defineService(() => {
return meta.value?.markedAt && topic.lastPostedAt > meta.value.markedAt
}

const entries = computed(() => latestTopics.value
.filter(topic => !topic.pinned)
.map(topic => ({
topic,
isUnread: getIsUnread(topic),
})))
const entries = computed(() => {
if (!latestTopics.value) return []
return latestTopics.value
.filter(topic => !topic.pinned)
.map(topic => ({ topic, isUnread: getIsUnread(topic) }))
})

const unreadCount = computed(() => entries.value.filter(entry => entry.isUnread).length)
return {
Expand Down

0 comments on commit e61ce32

Please sign in to comment.