aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/viewIcons/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/viewIcons/index.tsx')
-rw-r--r--src/plugins/viewIcons/index.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx
index 3bfe902..06a7c0a 100644
--- a/src/plugins/viewIcons/index.tsx
+++ b/src/plugins/viewIcons/index.tsx
@@ -83,6 +83,7 @@ function openImage(url: string) {
}
const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: UserContextProps) => () => {
+ if (!user) return;
const memberAvatar = GuildMemberStore.getMember(guildId!, user.id)?.avatar || null;
children.splice(-1, 0, (
@@ -111,7 +112,7 @@ const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: U
};
const GuildContext: NavContextMenuPatchCallback = (children, { guild }: GuildContextProps) => () => {
- if(!guild) return;
+ if (!guild) return;
const { id, icon, banner } = guild;
if (!banner && !icon) return;