mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-21 09:06:54 +08:00
Fixed crash if chat poll returns no response
https://dev.doctormckay.com/topic/383-error-in-node-steamcommunity/
This commit is contained in:
parent
542eb8d47e
commit
c1b04ee743
@ -181,8 +181,8 @@ SteamCommunity.prototype._chatPoll = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
if(body.error != 'OK') {
|
||||
self.emit('debug', 'Error in chat poll: ' + body.error);
|
||||
if(!body || body.error != 'OK') {
|
||||
self.emit('debug', 'Error in chat poll: ' + (body && body.error ? body.error : "Malformed response"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user