From 37744733b46b153468d7ab59bac2a7d6483cef26 Mon Sep 17 00:00:00 2001 From: Amaury Joly Date: Sat, 10 Apr 2021 17:43:59 +0200 Subject: [PATCH] inside start function we're awaiting the fetch call --- src/listener-rss.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/listener-rss.ts b/src/listener-rss.ts index db49208..06a14b8 100644 --- a/src/listener-rss.ts +++ b/src/listener-rss.ts @@ -67,10 +67,10 @@ export class ListenerRss extends EventEmitter { */ start(): void { this.loopRunning = true; - + const fun: () => void = async () => { - await Promise.resolve( - this.fetchRSS() + await Promise.resolve( + await this.fetchRSS() .then((obj: { [key: string]: any }) => { this.emit("update", obj); const updatedEntriesLinks = obj.items.map(