Permalink
Browse files

on_feed_response: checking if resp is defined before checking for res…

…p.body
  • Loading branch information...
1 parent 198c201 commit 268a9fed4cd2c44f10e83209d799874b1cf3b64c @mborho mborho committed Mar 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/feed.js
View
@@ -208,7 +208,7 @@ Feed.prototype.query = function query_feed() {
function on_feed_response(er, resp, body) {
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)))
if(timed_out) {

0 comments on commit 268a9fe

Please sign in to comment.