Skip to content

Commit

Permalink
Merge pull request #1023 from calledude/patch-1
Browse files Browse the repository at this point in the history
Fix role color lookup when role is removed but still owns a tag
  • Loading branch information
patrickklaeren authored Jul 31, 2024
2 parents 37d1842 + 138cb85 commit b4324e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Modix.Web/Pages/Tags.razor
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
<MudTd style="white-space:nowrap" DataLabel="Last Modified">@tag.Created.ToString("MM/dd/yy, h:mm:ss tt")</MudTd>
@if (tag.OwnerRole is not null)
{
var roleColor = Roles[tag.OwnerRole.Id].Color;
_ = Roles.TryGetValue(tag.OwnerRole.Id, out var role);
var roleColor = role?.Color ?? "currentColor";
<MudTd DataLabel="Owner" Style="@($"color: {roleColor}")">@@@tag.OwnerName</MudTd>
}
else
Expand Down

0 comments on commit b4324e5

Please sign in to comment.