Permalink
Browse files

Allow empty feeds.

  • Loading branch information...
ammmir committed Feb 21, 2011
1 parent 1171245 commit 9d61dfb6e0306f91b172256501f6728bab85ee33
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/feed.js
View
@@ -17,8 +17,10 @@ function Feed(feed) {
throw new Error('feed must contain "updated" key');
}
- for(var i = 0; i < this.feed['entry'].length; i++) {
- this.entries.push(new Entry(this.feed['entry'][i]));
+ if(this.feed['entry']) {
+ for(var i = 0; i < this.feed['entry'].length; i++) {
+ this.entries.push(new Entry(this.feed['entry'][i]));
+ }
}
}

0 comments on commit 9d61dfb

Please sign in to comment.