Return an error if we get invalid XML when getting a CSteamUser

This commit is contained in:
Alexander Corn 2015-09-19 23:35:01 -04:00
parent 80979bc387
commit 3d566ed0fb

View File

@ -40,6 +40,10 @@ SteamCommunity.prototype.getSteamUser = function(id, callback) {
customurl = match[1];
}
}
if(!result.profile.steamID64 || !result.profile.onlineState) {
callback(new Error("No valid response"));
}
callback(null, new CSteamUser(self, result.profile, customurl));
});