fix(phone/twitter): Fix crash on broadcast with no profile set

This commit is contained in:
Kire committed 2021-03-22 10:37:56 -04:00
1 parent c8f680fdfb
commit fe1e685f6f
1 file changed
+3 -1
@@ -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;