Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
fix: two rune bugs (#1160)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi authored and harrysolovay committed Jul 14, 2023
1 parent 96683bf commit 58a2c64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rune/Rune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export class Rune<out T, out U = never> {
}

async *iter(runner: Runner = globalRunner) {
let time = runner.timeline.current
const primed = runner.prime(this)
primed.reference()
let time = runner.timeline.current
try {
while (time !== Infinity) {
const receipt = new Receipt()
Expand Down Expand Up @@ -366,6 +366,7 @@ class RunAsyncIter<T> extends RunStream<T> {
super(runner)
;(async () => {
for await (const value of fn()) {
if (!this.alive) break
this.push(value)
}
this.finish()
Expand Down

0 comments on commit 58a2c64

Please sign in to comment.