We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73ba422 commit 187e365Copy full SHA for 187e365
index.js
@@ -21,7 +21,7 @@ Parser.parseString = function(xml, callback) {
21
XML2JS.parseString(xml, function(err, result) {
22
if (err) throw err;
23
var json = {feed: {entries: []}};
24
- var channel = result.rss.channel[0];
+ var channel = result.feed || result.rss.channel[0];
25
if (channel['atom:link']) json.feed.feedUrl = channel['atom:link'][0].href;
26
TOP_FIELDS.forEach(function(f) {
27
if (channel[f]) json.feed[f] = channel[f][0];
0 commit comments