Skip to content

Commit 9c9a6db

Browse files
author
Ubuntu
committed
only add categories if present
1 parent 82d2d89 commit 9c9a6db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Parser.parseString = function(xml, callback) {
3838
if (item.guid) {
3939
entry.guid = item.guid[0]._;
4040
}
41-
entry.categories = item.category;
41+
if (item.category) entry.categories = item.category;
4242
json.feed.entries.push(entry);
4343
})
4444
callback(null, json);

0 commit comments

Comments
 (0)