1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix null reference TypeScript error

This commit is contained in:
Dmitry Lyzo 2022-02-18 13:36:02 +03:00
parent 12d0ac2ff0
commit 12374b12b9

View file

@ -47,6 +47,11 @@ const UserProfilesPage: FunctionComponent = () => {
const card = dom.parentWithClass(elem, 'card'); 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');
return;
}
const menuItems: MenuEntry[] = []; const menuItems: MenuEntry[] = [];
menuItems.push({ menuItems.push({