Skip to content

Commit f26d521

Browse files
committed
Fix asyncDelegator reporting done too early
See: microsoft/TypeScript#45400
1 parent 8acd4b3 commit f26d521

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tslib.es6.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export function __asyncGenerator(thisArg, _arguments, generator) {
195195
export function __asyncDelegator(o) {
196196
var i, p;
197197
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
198-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
198+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
199199
}
200200

201201
export function __asyncValues(o) {

tslib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ var __createBinding;
237237
__asyncDelegator = function (o) {
238238
var i, p;
239239
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
240-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
240+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
241241
};
242242

243243
__asyncValues = function (o) {

0 commit comments

Comments
 (0)