diff --git a/spec.html b/spec.html index 0ed7c4dee5..b294691572 100644 --- a/spec.html +++ b/spec.html @@ -49322,23 +49322,17 @@

1. Assert: _generator_.[[AsyncGeneratorState]] is ~draining-queue~. 1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]]. - 1. If _queue_ is empty, then - 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. - 1. Return ~unused~. - 1. Let _done_ be *false*. - 1. Repeat, while _done_ is *false*, + 1. Repeat, while _queue_ is not empty, 1. Let _next_ be the first element of _queue_. 1. Let _completion_ be Completion(_next_.[[Completion]]). 1. If _completion_ is a return completion, then 1. Perform AsyncGeneratorAwaitReturn(_generator_). - 1. Set _done_ to *true*. + 1. Return ~unused~. 1. Else, 1. If _completion_ is a normal completion, then 1. Set _completion_ to NormalCompletion(*undefined*). 1. Perform AsyncGeneratorCompleteStep(_generator_, _completion_, *true*). - 1. If _queue_ is empty, then - 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. - 1. Set _done_ to *true*. + 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. 1. Return ~unused~.