Skip to content

Commit

Permalink
fixup! fix timing of ensureIsPromise
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed May 16, 2024
1 parent 237f474 commit 7326da7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/webstreams/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ function enqueueValueWithSize(controller, value, size) {
controller[kState].queueTotalSize += size;
}

// This implements "invoke a callback function type" for callback functions that return a promise.
// See https://webidl.spec.whatwg.org/#es-invoking-callback-functions
async function ensureIsPromise(fn, thisArg, ...args) {
return await FunctionPrototypeCall(fn, thisArg, ...args);
return FunctionPrototypeCall(fn, thisArg, ...args);
}

function createPromiseCallback(name, fn, thisArg) {
Expand Down

0 comments on commit 7326da7

Please sign in to comment.