File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/runtime/src/helpers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,6 @@ import {
85
85
// Deno defines "window", but naughty libraries think this means it's a browser
86
86
delete globalThis.window
87
87
globalThis.process = { env: {...Deno.env.toObject(), NEXT_RUNTIME: 'edge', 'NEXT_PRIVATE_MINIMAL_MODE': '1' } }
88
- // Next uses "self" as a function-scoped global-like object
89
- const self = {}
90
88
let _ENTRIES = {}
91
89
92
90
// Next.js uses this extension to the Headers API implemented by Cloudflare workerd
@@ -118,6 +116,9 @@ const fetch = async (url, init) => {
118
116
}
119
117
}
120
118
119
+ // Latest Next uses "self" as a function-scoped global-like object, but older versions expect it to equal "globalThis"
120
+ const self = { ...globalThis, fetch }
121
+
121
122
`
122
123
123
124
// Slightly different spacing in different versions!
You can’t perform that action at this time.
0 commit comments