This commit is contained in:
Cedric Hoelzl 2020-07-03 11:21:10 +02:00
parent cfb9d7fd35
commit 574273755c

View File

@ -13,10 +13,10 @@ var db = new db_js("rss_chan");
//=== TOOL FUNCTIONS
const get_rss = function(url,min_id){
return parser.parseURL(url).then(feed=>{
let idx = feed.findIndex(i => i.prop_1 === min_id);
if(idx>=0) return feed.items.slice(0,idx);
else return feed.items;
return parser.parseURL(url).then(feed=>feed.items).then(items=>{
let idx = items.findIndex(i => i.prop_1 === min_id);
if(idx>=0) return items.slice(0,idx);
else return items;
});
}