Add in null check for user when getting hue in chat

This commit is contained in:
James Allen 2016-11-25 11:08:32 +00:00
parent 04c151eed0
commit 65c1a62cb7

View file

@ -4,5 +4,8 @@ define [
], (App, ColorManager) ->
App.controller "ChatMessageController", ["$scope", "ide", ($scope, ide) ->
$scope.hue = (user) ->
ColorManager.getHueForUserId(user.id)
if !user?
return 0
else
return ColorManager.getHueForUserId(user.id)
]