mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-05-31 01:11:07 +00:00
Hopefully preventing application from crashing should hive not respond properly
This commit is contained in:
parent
18619214f3
commit
48d3582107
1 changed files with 3 additions and 0 deletions
|
@ -89,6 +89,9 @@ const StatAttributes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function UserStatisticsWrapper (apiResponse) {
|
function UserStatisticsWrapper (apiResponse) {
|
||||||
|
if(apiResponse === undefined) {
|
||||||
|
apiResponse = {};
|
||||||
|
}
|
||||||
for (let attr in StatAttributes) {
|
for (let attr in StatAttributes) {
|
||||||
let adapter = StatAttributes[attr];
|
let adapter = StatAttributes[attr];
|
||||||
this[attr] = apiResponse[adapter.v1] ||
|
this[attr] = apiResponse[adapter.v1] ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue