mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-21 09:06:54 +08:00
Fixed double callbacks on some json errors (fixes #123)
This commit is contained in:
parent
dd638df118
commit
17f51b9caa
@ -60,10 +60,10 @@ SteamCommunity.prototype.httpRequest = function(uri, options, callback, source)
|
||||
"jsonError": jsonError
|
||||
});
|
||||
|
||||
if (hasCallback) {
|
||||
if (hasCallback && !(httpError || communityError || tradeError)) {
|
||||
if (jsonError) {
|
||||
callback.call(self, jsonError, response);
|
||||
} else if (!(httpError || communityError || tradeError)) {
|
||||
} else {
|
||||
callback.apply(self, arguments);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user