Fix for null steam ids

This commit is contained in:
Chris Blanchard 2015-10-31 10:43:05 +00:00
parent 061734679d
commit 959555bb5b
2 changed files with 16 additions and 8 deletions

View file

@ -24,11 +24,19 @@ function User (user) {
this.moderator = user['moderator'];
this.team = user['team'];
this.bans = user['bans'];
if (user['steam']) {
this.steam = {
id: user['steam']['id'] || null,
url: user['steam']['url'] || null,
nickname: user['steam']['nickname'] || null
};
} else {
this.steam = {
id: null,
url: null,
nickname: null
};
}
this.profile = null;
this.hive = {
id: null