From 574273755c20c616b91e74ac71d121d785db59f1 Mon Sep 17 00:00:00 2001 From: Cedric Hoelzl Date: Fri, 3 Jul 2020 11:21:10 +0200 Subject: [PATCH] newv --- config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.js b/config.js index 9236600..4cc73f3 100644 --- a/config.js +++ b/config.js @@ -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; }); }