Skip to content

Commit

Permalink
Guard against empty team
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsturgeon committed Sep 23, 2023
1 parent fc11cc5 commit 3d20638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moon/cfc_chat_transit/server/init.moon
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ ChatTransit.GetRankColor = (ply) =>
groupName = user and user.group or "user"

team = ULib.ucl.groups[groupName].team
teamColor = "#{team.color_red} #{team.color_green} #{team.color_blue} 255"

return teamColor
return "#{team.color_red} #{team.color_green} #{team.color_blue} 255" if team
return "255 255 0 255"

ChatTransit.guard = (f, delay) -> (...) ->
args = {...}
Expand Down

0 comments on commit 3d20638

Please sign in to comment.