From d62550bb3b09e5a0e6b10636eb93f21cf046f60e Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 7 Jul 2023 21:25:23 -0400 Subject: [PATCH] Fix null handling --- src/apps/stable/routes/user/userprofiles.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/stable/routes/user/userprofiles.tsx b/src/apps/stable/routes/user/userprofiles.tsx index b386533f4..dc8a6e86f 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');