small fix for sanity

This commit is contained in:
Nick Gordon
2013-11-27 22:48:48 -08:00
parent 62aeb7087a
commit 5b610bfc5c

View File

@@ -24,9 +24,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
// styling helpers // styling helpers
$scope.userLevelStyle = function(user,style){ $scope.userLevelStyle = function(user,style){
style = style || ''; style = style || '';
if(user.backer.npc) if(user && user.backer && user.backer.npc)
style += ' label-npc'; style += ' label-npc';
if(user.contributor.level) if(user && user.contributor && user.contributor.level)
style += ' label-contributor-'+user.contributor.level; style += ' label-contributor-'+user.contributor.level;
return style; return style;
} }