diff --git a/lib/race.ts b/lib/race.ts index bf6f6f40..df6be05c 100644 --- a/lib/race.ts +++ b/lib/race.ts @@ -41,7 +41,7 @@ export function* race>( // encapsulate the race in a hermetic scope. let result = yield* trap(() => encapsulate(function* () { - for (let operation of operations.toReversed()) { + for (let operation of operations.slice().reverse()) { tasks.push( yield* spawn(function* () { // let contestant = yield* useScope();