From 8f00959ef9503705552833b0515afe0a4563d683 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 24 Oct 2022 21:11:00 -0500 Subject: [PATCH] fix profile issue with no available interactions --- WebfrontCore/Views/Client/Profile/Index.cshtml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index be5f10281..fd1f0fb83 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -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,