Skip to content

Commit

Permalink
Clear resolved result after using
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Sep 24, 2024
1 parent 705204d commit 160395a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion util/RangeIterable.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ export class RangeIterable {
return result;
}
}
let result = resolvedResult ?? iterator.next();
let result;
if (resolvedResult != undefined) {
result = resolvedResult;
resolvedResult = undefined;
} else result = iterator.next();
if (result.then) {
if (!options.async)
throw new Error(
Expand Down

0 comments on commit 160395a

Please sign in to comment.