Skip to content

Commit

Permalink
Merge pull request #216 from ubiquity-whilefoo/hono
Browse files Browse the repository at this point in the history
fix: illegal invocation
  • Loading branch information
gentlementlegen authored Dec 2, 2024
2 parents 1a53d48 + f393668 commit ef41f58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ app.post("/", async (ctx: Context) => {

// if running in Cloudflare Worker, handle the webhook in the background and return a response immediately
if (getRuntimeKey() === "workerd") {
const waitUntil = ctx.executionCtx.waitUntil;
waitUntil(eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 }));
ctx.executionCtx.waitUntil(eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 }));
} else {
await eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 });
}
Expand Down

0 comments on commit ef41f58

Please sign in to comment.