sidebarlistheader: fixing potential undefined ref

This commit is contained in:
Hunter Miller 2022-01-13 16:14:22 -06:00
parent c13ec5a698
commit ed3b19cd0f

View File

@ -45,7 +45,7 @@ export function SidebarListHeader(props: {
const metadata = associations?.groups?.[groupPath]?.metadata;
const memberMetadata =
groupPath ? metadata.vip === 'member-metadata' : false;
groupPath && metadata ? metadata.vip === 'member-metadata' : false;
const isAdmin = memberMetadata || (role === 'admin') || (props.workspace?.type === 'home') || (props.workspace?.type === 'messages');