From 9b11c8da4cfbdaa276f3a3d8cd14ab913c352c71 Mon Sep 17 00:00:00 2001 From: Dina Basumatary Date: Tue, 30 Nov 2021 22:29:04 +1100 Subject: [PATCH] async keyword not needed since the function is already returning a Promise. --- .../11-asyncawait-web-spider-v4/TaskQueuePC.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05-asynchronous-control-flow-patterns-with-promises-and-async-await/11-asyncawait-web-spider-v4/TaskQueuePC.js b/05-asynchronous-control-flow-patterns-with-promises-and-async-await/11-asyncawait-web-spider-v4/TaskQueuePC.js index 600e575c..0317ab68 100644 --- a/05-asynchronous-control-flow-patterns-with-promises-and-async-await/11-asyncawait-web-spider-v4/TaskQueuePC.js +++ b/05-asynchronous-control-flow-patterns-with-promises-and-async-await/11-asyncawait-web-spider-v4/TaskQueuePC.js @@ -20,7 +20,7 @@ export class TaskQueuePC { } } - async getNextTask () { + getNextTask () { return new Promise((resolve) => { if (this.taskQueue.length !== 0) { return resolve(this.taskQueue.shift())