Skip to content

Commit

Permalink
fix: delete init.cache rather than assign undefined
Browse files Browse the repository at this point in the history
Fix an issue with NextAuth (#206)
  • Loading branch information
vicb committed Dec 27, 2024
1 parent c0c1d04 commit 1534f53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/khaki-shirts-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@opennextjs/cloudflare": patch
---

fix: delete init.cache rather than assign undefined

Assigning undefined to init.cache throws when using NextAuth
2 changes: 1 addition & 1 deletion packages/cloudflare/src/cli/build/bundle-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fetch = globalThis.fetch;
const CustomRequest = class extends globalThis.Request {
constructor(input, init) {
if (init) {
init.cache = undefined;
delete init.cache;
// https://github.com/cloudflare/workerd/issues/2746
// https://github.com/cloudflare/workerd/issues/3245
Object.defineProperty(init, "body", {
Expand Down

0 comments on commit 1534f53

Please sign in to comment.