diff --git a/phone/src/apps/twitter/hooks/useTwitterNotifications.ts b/phone/src/apps/twitter/hooks/useTwitterNotifications.ts index 046b35f..a754b20 100644 --- a/phone/src/apps/twitter/hooks/useTwitterNotifications.ts +++ b/phone/src/apps/twitter/hooks/useTwitterNotifications.ts @@ -36,7 +36,9 @@ export const useTwitterNotifications = () => { // defend against this case if (!profile) return; - const currentProfileName = profile.profile_name; + // Prevents a crash if there is no current profile + // set and a Twitter broadcast occurs. + const currentProfileName = profile?.profile_name; // we don't want notifications of our own tweets if (currentProfileName === profile_name) return;