Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'insertBefore' of undefined when using Suspense and lazy #3149

Closed
1 task done
pt-hoang opened this issue May 12, 2021 · 3 comments
Closed
1 task done

Comments

@pt-hoang
Copy link

pt-hoang commented May 12, 2021

  • Check if updating to the latest Preact version resolves the issue

Describe the bug
Cannot read property 'insertBefore' of undefined when using Suspense and lazy. Reason being originalParent is undefined in Suspense's removeOriginal function

Works if checks originalParent before calling insertBefore on it
image

To Reproduce

If possible, please provide a CodeSandbox/Codepen that demonstrates the issue. You can use the following template: https://codesandbox.io/s/immutable-grass-ziq4b?file=/src/index.js

Steps to reproduce the behavior:
In codesandbox

Expected behavior
No error

@pt-hoang pt-hoang changed the title Cannot read property 'insertBefore' of undefined when using Suspense and lazy` Cannot read property 'insertBefore' of undefined when using Suspense and lazy May 12, 2021
@developit
Copy link
Member

I think someone else ran into this as well. Not 100% sure what the root cause is.

@Nedomas
Copy link

Nedomas commented Jul 18, 2021

I have the same problem when state above suspense changes. Did you find the solution @pt-hoang ? I understand this is preact only bug?

@JoviDeCroock
Copy link
Member

Seems like a duplicate of #3105 let's track there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants