mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(phone/twitter): Fix crash on broadcast with no profile set
This commit is contained in:
1 parent
c8f680fdfb
commit
fe1e685f6f
1 file changed
+3
-1
@@ -36,7 +36,9 @@ export const useTwitterNotifications = () => {
|
|||||||
// defend against this case
|
// defend against this case
|
||||||
if (!profile) return;
|
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
|
// we don't want notifications of our own tweets
|
||||||
if (currentProfileName === profile_name) return;
|
if (currentProfileName === profile_name) return;
|
||||||
|
|||||||
Reference in new issue
Block a user