From 65c1a62cb70ab139d528c9381dc27ab01e12d1ee Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 25 Nov 2016 11:08:32 +0000 Subject: [PATCH] Add in null check for user when getting hue in chat --- .../coffee/ide/chat/controllers/ChatMessageController.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/chat/controllers/ChatMessageController.coffee b/services/web/public/coffee/ide/chat/controllers/ChatMessageController.coffee index 6c79efd0ad..30fbccd05a 100644 --- a/services/web/public/coffee/ide/chat/controllers/ChatMessageController.coffee +++ b/services/web/public/coffee/ide/chat/controllers/ChatMessageController.coffee @@ -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) ] \ No newline at end of file