Skip to content

Commit

Permalink
fix profile issue with no available interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Oct 25, 2022
1 parent 1d6cc67 commit 8f00959
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WebfrontCore/Views/Client/Profile/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Title = interaction.Name,
Expand Down

0 comments on commit 8f00959

Please sign in to comment.