mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-25 22:01:00 +00:00
Fixing steamId not beeing set properly so hive id could not be retrieved
This commit is contained in:
parent
0a956b80bd
commit
a7da403571
2 changed files with 3 additions and 6 deletions
|
@ -88,10 +88,7 @@ const StatAttributes = {
|
|||
}
|
||||
};
|
||||
|
||||
function UserStatisticsWrapper (apiResponse) {
|
||||
if(apiResponse === undefined) {
|
||||
apiResponse = {};
|
||||
}
|
||||
function UserStatisticsWrapper (apiResponse = {}) {
|
||||
for (let attr in StatAttributes) {
|
||||
let adapter = StatAttributes[attr];
|
||||
this[attr] = apiResponse[adapter.v1] ||
|
||||
|
|
|
@ -26,7 +26,7 @@ function User (user) {
|
|||
this.bans = user['bans'];
|
||||
if (user['steam']) {
|
||||
this.steam = {
|
||||
id: user['steam']['id'] || null,
|
||||
id: user['steam']['id'] || this.getSteamId(),
|
||||
url: user['steam']['url'] || null,
|
||||
nickname: user['steam']['nickname'] || null
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ function User (user) {
|
|||
id: null
|
||||
};
|
||||
|
||||
if (this.steam.url) {
|
||||
if (this.steam.id) {
|
||||
this.hive.id = this.getHiveId();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue