From 84a217efa965090464e78414fb857f6e20db4d12 Mon Sep 17 00:00:00 2001 From: Matt Voboril Date: Thu, 13 Aug 2020 13:21:08 -0500 Subject: [PATCH] fix: coverage (#206) --- src/FeedManager.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/FeedManager.js b/src/FeedManager.js index d4cebb2..a06ac91 100644 --- a/src/FeedManager.js +++ b/src/FeedManager.js @@ -106,21 +106,17 @@ class FeedManager { * @param {boolean} firstload whether or not this is the first load on the manager */ async getContent(firstload) { - try { - const items = await this.feed.fetchData(); - const data = { - items, - url: this.feed.url, - }; - this.feed.updateHxLength(items); - this.sortItemsByDate(data); - this.identifyNewItems(data); - this.populateNewItemsInFeed(data, firstload); - if (firstload && !this.instance.skipFirstLoad) { - this.instance.emit(`initial-load:${this.feed.url}`, { url: this.feed.url, items: this.feed.items }); - } - } catch (e) { - this.onError(e); + const items = await this.feed.fetchData(); + const data = { + items, + url: this.feed.url, + }; + this.feed.updateHxLength(items); + this.sortItemsByDate(data); + this.identifyNewItems(data); + this.populateNewItemsInFeed(data, firstload); + if (firstload && !this.instance.skipFirstLoad) { + this.instance.emit(`initial-load:${this.feed.url}`, { url: this.feed.url, items: this.feed.items }); } } }