Repository navigation
Commit 67bffe8
committed
fix(backend): Prevent illegal invocation error
Invoking the global.fetch without binding it first to the globalObject fails in Cloudflare Workers with an "Illegal Invocation" error. To fix the issue, we have to bind fetch to the
globalThis object. A customer reported this issue using @clerk/remix on Cloudflare Pages.
The globalThis object is supported for Node >= 12.0.
For more information, refer to supabase/supabase#44171 parent 6945ac8 commit 67bffe8
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | | - | |
| 35 | + | |
28 | 36 | | |
0 commit comments