Skip to content

Commit

Permalink
fix: pass env and ctx to request handler when using `--experimental-p…
Browse files Browse the repository at this point in the history
…ublic` (#1260)

(as reported on discord)
  • Loading branch information
threepointone authored Jun 14, 2022
1 parent e61fba8 commit d8ee04f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tender-tables-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: pass env and ctx to request handler when using `--experimental-public`
2 changes: 1 addition & 1 deletion packages/wrangler/templates/static-asset-facade.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
} catch (e) {
console.error(e);
// if an error is thrown then serve from actual worker
return worker.fetch(request);
return worker.fetch(request, env, ctx);
// TODO: throw here if worker is not available
// (which implies it may be a service-worker)
}
Expand Down

0 comments on commit d8ee04f

Please sign in to comment.