1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed null reference

This commit is contained in:
Uncled1023 2022-05-30 14:15:00 -07:00
parent 22020404b9
commit c79fbdbf92

View File

@ -6,7 +6,7 @@
<div class="container">
@if (!Model.Error)
{
bool OwnProfile = (Model.Username == User.Identity.Name || User.IsInRole("Admin")) && User.Identity.IsAuthenticated;
bool OwnProfile = (User.Identity?.IsAuthenticated ?? false) && (Model.Username == User.Identity?.Name || User.IsInRole("Admin"));
string gitHost = Config.GitConfig.Host;
string gitFullUrl = string.Empty;
if (!string.IsNullOrEmpty(gitHost))