fix profile issue with no available interactions

This commit is contained in:
RaidMax 2022-10-24 21:11:00 -05:00
parent dbca3675ba
commit 2e149ddafd

View File

@ -391,8 +391,13 @@
}); });
} }
foreach (var interaction in Model.Interactions.Where(i => (int)ViewBag.User.Level >= ((int?)i.MinimumPermission ?? 0))) foreach (var interaction in Model.Interactions?.Where(i => (int?)ViewBag.User?.Level >= ((int?)i?.MinimumPermission ?? 0)))
{ {
if (interaction is null)
{
continue;
}
menuItems.Items.Add(new SideContextMenuItem menuItems.Items.Add(new SideContextMenuItem
{ {
Title = interaction.Name, Title = interaction.Name,