mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-29 15:42:18 +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) {
|
||||
if(apiResponse === undefined) {
|
||||
apiResponse = {};
|
||||
}
|
||||
for (let attr in StatAttributes) {
|
||||
let adapter = StatAttributes[attr];
|
||||
this[attr] = apiResponse[adapter.v1] ||
|
||||
|
|
Loading…
Reference in a new issue