Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad committed Sep 28, 2022
1 parent 9eaccb5 commit 35f9d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bench.ts
Expand Up @@ -64,7 +64,7 @@ export default class Bench extends EventTarget {
async run() {
this.dispatchEvent(createBenchEvent('start'));
const values = await Promise.all(
[...this.#tasks.entries()].map(([_, task]) => {
[...this.#tasks.values()].map((task) => {
if (this.signal?.aborted) {
return task;
}
Expand All @@ -81,7 +81,7 @@ export default class Bench extends EventTarget {
async runSequentially() {
this.dispatchEvent(createBenchEvent('start'));
const values: Task[] = [];
for (const [_, task] of [...this.#tasks.entries()]) {
for (const task of [...this.#tasks.values()]) {
if (this.signal?.aborted) {
values.push(task);
}
Expand Down

0 comments on commit 35f9d20

Please sign in to comment.