diff --git a/src/apps/stable/routes/user/userprofiles.tsx b/src/apps/stable/routes/user/userprofiles.tsx index b386533f4b..dc8a6e86fd 100644 --- a/src/apps/stable/routes/user/userprofiles.tsx +++ b/src/apps/stable/routes/user/userprofiles.tsx @@ -48,7 +48,7 @@ const UserProfiles: FunctionComponent = () => { const showUserMenu = (elem: HTMLElement) => { const card = dom.parentWithClass(elem, 'card'); - const userId = card.getAttribute('data-userid'); + const userId = card?.getAttribute('data-userid'); if (!userId) { console.error('Unexpected null user id');