danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 192 forks source link

Cannot read property 'ispermalink' of undefined #113

Closed kof closed 10 years ago

kof commented 10 years ago

http://feeds.braingle.com/braingle/newteasers

TypeError: Cannot read property 'ispermalink' of undefined
    at FeedParser.<anonymous> (xxx/code/node_modules/feedparser/main.js:814:66)
    at Array.forEach (native)
    at FeedParser.handleItem (xxx/code/node_modules/feedparser/main.js:722:21)
    at FeedParser.handleCloseTag (xxx/code/node_modules/feedparser/main.js:300:17)
danmactough commented 10 years ago

Thanks. Need to think about this. That feed has 2 guid elements per item, which is invalid. So, I need to think about exactly how I want to handle this.

kof commented 10 years ago

just take the last one

danmactough commented 10 years ago

just take the last one

Actually taking the first, just fyi. I have a helper that I use for this throughout the module. It's kind of crappy, but at least it's consistent.