Skip to content
Commit Detail

Commit 1249bd6

Author
Hood Chatham <roberthoodchatham@gmail.com> 2026-04-29 10:36:21 -0700
Parents
6de293f
Tree
187f832
Ensure using `fetch` on top-level with dedicated snapshot gives good error (#6654)

Changes error for top level fetch from:
```
TypeError: Illegal invocation: function called with incorrect `this` reference.
```
to:
```
Error: Disallowed operation called within global scope. Asynchronous I/O
(ex: fetch() or connect()), setting a timeout, and generating random values are
not allowed within global scope. ...
```

This is a workaround for the fact that we don't have pyodide/pyodide#5588 in
Pyodide 0.28.2, this fix is upstreamed starting with Pyodide 0.29.0

Files changed