diff --git a/worker-build/src/js/shim.js b/worker-build/src/js/shim.js index 6efdbdd5..0e62d5e3 100644 --- a/worker-build/src/js/shim.js +++ b/worker-build/src/js/shim.js @@ -21,8 +21,10 @@ class Entrypoint extends WorkerEntrypoint { return await imports.scheduled(event, this.env, this.ctx) } - async email(message) { - return await imports.email(message, this.env, this.ctx) + // For some reason, email events doesn't seem to use WorkerEntrypoint so we get the env and ctx from + // from the function itself. + async email(message, _env, _ctx) { + return await imports.email(message, _env, _ctx) } }