Skip to content

Commit

Permalink
fix: frontend fails to load when announcement flag isn't set (#4329)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Jul 12, 2024
1 parent b32a6ca commit c047233
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/web/components/Announcement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const Announcement: FC<AnnouncementType> = () => {
}

const announcementValue = Utils.getFlagsmithJSONValue('announcement', null)

if (!announcementValue) {
return null
}

const { buttonText, description, id, isClosable, title, url } =
announcementValue as AnnouncementValueType
const dismissed = flagsmith.getTrait('dismissed_announcement')
Expand Down

0 comments on commit c047233

Please sign in to comment.