mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-19 08:01:07 +00:00
Fix for null steam ids
This commit is contained in:
parent
061734679d
commit
959555bb5b
2 changed files with 16 additions and 8 deletions
|
@ -136,9 +136,9 @@ var UserItem = React.createClass({
|
|||
let user = this.props.user;
|
||||
return (
|
||||
<li className="list-group-item">
|
||||
<a href="#" data-toggle="modal"
|
||||
data-target={`#${modalId(user)}`}>{user.username}</a>
|
||||
<UserModal user={user} />
|
||||
<a href="#" data-toggle="modal"
|
||||
data-target={`#${modalId(user)}`}>{user.username}</a>
|
||||
<UserModal user={user} />
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -24,11 +24,19 @@ function User (user) {
|
|||
this.moderator = user['moderator'];
|
||||
this.team = user['team'];
|
||||
this.bans = user['bans'];
|
||||
this.steam = {
|
||||
id: user['steam']['id'] || null,
|
||||
url: user['steam']['url'] || null,
|
||||
nickname: user['steam']['nickname'] || null
|
||||
};
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue