Skip to content
Snippets Groups Projects
Unverified Commit f3d97cf9 authored by tusooa's avatar tusooa :zap: Committed by tusooa
Browse files

Improve readability in fetchAnnouncements()

parent 23a9a465
No related branches found
No related tags found
2 merge requests!1711Update stable - 2.5.0 release,!1466Announcements
......@@ -54,12 +54,14 @@ const announcements = {
a[c.id] = c
return a
}, {})
const getWithinVisible = announcement => visibleObject[announcement.id]
all.forEach(announcement => {
if (!visibleObject[announcement.id]) {
const visibleAnnouncement = getWithinVisible(announcement)
if (!visibleAnnouncement) {
announcement.inactive = true
} else {
announcement.read = visibleObject[announcement.id].read
announcement.read = visibleAnnouncement.read
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment