From 5b610bfc5c91a2d604d90a5dfb673d73329bdce2 Mon Sep 17 00:00:00 2001 From: Nick Gordon Date: Wed, 27 Nov 2013 22:48:48 -0800 Subject: [PATCH] small fix for sanity --- public/js/controllers/rootCtrl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index f3a52e90d9..55ada3cb67 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -24,9 +24,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ // styling helpers $scope.userLevelStyle = function(user,style){ style = style || ''; - if(user.backer.npc) + if(user && user.backer && user.backer.npc) style += ' label-npc'; - if(user.contributor.level) + if(user && user.contributor && user.contributor.level) style += ' label-contributor-'+user.contributor.level; return style; }