From ca579fed79e799bf694d06552bffa45d51f0d082 Mon Sep 17 00:00:00 2001 From: Andy Espagnolo Date: Mon, 23 Oct 2023 16:25:30 -0300 Subject: [PATCH] fix: empty notifications state (#1364) --- src/components/Notifications/Notifications.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Notifications/Notifications.tsx b/src/components/Notifications/Notifications.tsx index 79c663e7f..ae5fbe307 100644 --- a/src/components/Notifications/Notifications.tsx +++ b/src/components/Notifications/Notifications.tsx @@ -84,7 +84,7 @@ export default function Notifications() { queryFn: () => (user ? Governance.get().getUserNotifications(user) : null), enabled: !!user && isSubscribed, }) - const latestNotification = userNotifications?.[0].payload_id + const latestNotification = userNotifications?.[0]?.payload_id const { data: lastNotificationId } = useQuery({ queryKey: [lastNotificationQueryKey],