Skip to content

Commit 3d651bc

Browse files
fix internal usage of global instead of globalThis (#963)
1 parent a2fe90d commit 3d651bc

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/tidy-geese-film.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudflare/next-on-pages': patch
3+
---
4+
5+
fix internal usage of `global` instead of `globalThis` (which causes some reference errors)

packages/next-on-pages/templates/_worker.js/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ const patchedDefineProperty = (
4444
return originalDefineProperty(...args);
4545
};
4646

47-
global.Object.defineProperty =
48-
patchedDefineProperty as typeof global.Object.defineProperty;
47+
globalThis.Object.defineProperty =
48+
patchedDefineProperty as typeof globalThis.Object.defineProperty;
4949

50-
global.AbortController = class PatchedAbortController extends AbortController {
50+
globalThis.AbortController = class PatchedAbortController extends AbortController {
5151
constructor() {
5252
try {
5353
super();

0 commit comments

Comments
 (0)