Skip to content

Commit

Permalink
on_feed_response: checking if resp is defined before checking for res…
Browse files Browse the repository at this point in the history
…p.body
  • Loading branch information
mborho committed Mar 3, 2012
1 parent 198c201 commit 268a9fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/feed.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Feed.prototype.query = function query_feed() {
function on_feed_response(er, resp, body) { function on_feed_response(er, resp, body) {
clearTimeout(response_timer) clearTimeout(response_timer)


if(resp.body || body) if((resp !== undefined && resp.body) || body)
return self.die(new Error('Cannot handle a body in the feed response: ' + lib.JS(resp.body || body))) return self.die(new Error('Cannot handle a body in the feed response: ' + lib.JS(resp.body || body)))


if(timed_out) { if(timed_out) {
Expand Down

0 comments on commit 268a9fe

Please sign in to comment.