I am using Parcel + TypeScript + Preact and when i upgraded from Preact version 10.0.0 to 10.0.1 I started to get an error with Suspense.
Uncaught (in promise) TypeError: Cannot read property 'indexOf' of null
at t (suspense.js:64)
All that changed was the patch version of Preact. I have a repository showing the issue and my settings here: https://github.com/nrdobie/preact-10.0.1-issue. The master branch uses 10.0.0 and broken branch uses 10.0.1
Main Packages Versions:
Ran into the same issue but with Webpack + TS + Preact.
10.0.0 also works fine but updating to 10.0.1 breaks it as above.
Fix has been PR'ed, thanks for the reproduction this helped me to tackle the problem. It's a bit of a bad luck one to be fair. The thing is that it wasn't safe for _suspensions to exist without mangling this would mean that terser is safe to mangle it to whatever it wants which can interfere/be overwritten.
This has now been pinned to __u.
I still have this problem with version 10.0.5. I just checked it with version 10.0.0 and it worked with this version. But with all following version the problem still exists.
suspense.js:65 Uncaught (in promise) TypeError: t.__u.indexOf is not a function
at e (suspense.js:65)
Hey,
The target is right in your issue @janbaer so we might need a reproduction for that one since it seems to work in simple cases. This might be a separate issue
Most helpful comment
Fix has been PR'ed, thanks for the reproduction this helped me to tackle the problem. It's a bit of a bad luck one to be fair. The thing is that it wasn't safe for
_suspensionsto exist without mangling this would mean that terser is safe to mangle it to whatever it wants which can interfere/be overwritten.This has now been pinned to
__u.