inside start function we're awaiting the fetch call

This commit is contained in:
Amaury Joly 2021-04-10 17:43:59 +02:00
parent b39e47f4ea
commit 37744733b4

View File

@ -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(