Skip to content

Commit b3949ce

Browse files
authored
fix: delete init.cache rather than assign undefined (#212)
Fix an issue with NextAuth (#206)
1 parent 12a1f75 commit b3949ce

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/khaki-shirts-deliver.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: delete init.cache rather than assign undefined
6+
7+
Assigning undefined to init.cache throws when using NextAuth

packages/cloudflare/src/cli/build/bundle-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fetch = globalThis.fetch;
9494
const CustomRequest = class extends globalThis.Request {
9595
constructor(input, init) {
9696
if (init) {
97-
init.cache = undefined;
97+
delete init.cache;
9898
// https://github.com/cloudflare/workerd/issues/2746
9999
// https://github.com/cloudflare/workerd/issues/3245
100100
Object.defineProperty(init, "body", {

0 commit comments

Comments
 (0)