diff --git a/packages/notification-services-controller/src/NotificationServicesController/services/feature-announcements.ts b/packages/notification-services-controller/src/NotificationServicesController/services/feature-announcements.ts index 972c28204f..42d982e866 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/services/feature-announcements.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/services/feature-announcements.ts @@ -135,7 +135,7 @@ const fetchFeatureAnnouncementNotifications = async ( export async function getFeatureAnnouncementNotifications( env: Env, ): Promise { - if (env && env.accessToken && env.spaceId && env.platform) { + if (env?.accessToken && env?.spaceId && env?.platform) { const rawNotifications = await fetchFeatureAnnouncementNotifications(env); const notifications = rawNotifications.map((notification) => processFeatureAnnouncement(notification),