Guard against empty team

This commit is contained in:
Brandon Sturgeon 2023-09-22 19:36:02 -07:00
parent fc11cc59bc
commit 3d2063875e
No known key found for this signature in database
GPG Key ID: 93451558FC64495C

View File

@ -64,9 +64,9 @@ ChatTransit.GetRankColor = (ply) =>
groupName = user and user.group or "user" groupName = user and user.group or "user"
team = ULib.ucl.groups[groupName].team 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) -> (...) -> ChatTransit.guard = (f, delay) -> (...) ->
args = {...} args = {...}