Hopefully preventing application from crashing should hive not respond properly

This commit is contained in:
Absurdon 2017-11-23 21:47:07 +01:00
parent 18619214f3
commit 48d3582107

View file

@ -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] ||