mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-21 13:24:16 +00:00
small fix for sanity
This commit is contained in:
parent
62aeb7087a
commit
5b610bfc5c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue