Permalink
Browse files

Bugfix: handle empty result

  • Loading branch information...
1 parent 1441105 commit 0b770a588418579a477c922357450e04b91e8383 Michael Hughes committed Apr 8, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/server/FeedCollector.coffee
@@ -32,9 +32,9 @@ exports.createFeedCollector = (feed)->
parser.parseString data, (err,result)=>
if err
fun(err,null)
- else if result.rss
+ else if result?.rss
fun(null,@parseRSS result.rss.channel)
- else if result.feed
+ else if result?.feed
fun(null,@parseAtom result.feed)
else
fun("Unable to parse feed",null)

0 comments on commit 0b770a5

Please sign in to comment.