Skip to content
Browse files

there was no need for setting the root element multiple times

  • Loading branch information...
1 parent ed31c95 commit 0a07e99d94e9e3e22a0a084eca1c1b729ce6b505 @fb55 fb55 committed Aug 26, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/nodepie.js
View
8 lib/nodepie.js
@@ -212,29 +212,27 @@ NodePie.prototype._checkType = function(){
type = key.trim().toLowerCase();
- this.rootElement = elem;
-
if(type === "feed"){
this.feedType = "atom";
+ this.rootElement = elem;
this.channelElement = elem || {};
this.itemsElement = elem.entry || [];
break;
}
else if(type === "rss"){
this.feedType = "rss";
+ this.rootElement = elem;
this.channelElement = elem.channel || {};
this.itemsElement = this.channelElement.item || [];
break;
}
else if(type === "rdf" || type.substr(-4) === ":rdf"){
this.feedType = "rdf";
+ this.rootElement = elem;
this.channelElement = elem.channel || {};
this.itemsElement = elem.item || [];
break;
}
- else{
- this.rootElement = null;
- }
}
if(!this.rootElement){

0 comments on commit 0a07e99

Please sign in to comment.
Something went wrong with that request. Please try again.