-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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 'return' of null #12449
Comments
Hmm, I was concerned this might happen. We assume that |
Changing line 877 to const sourceFiber: Fiber = failedUnitOfWork; isn't a sufficient fix because if it's not equal to One option is to add an invariant that throws if |
Repro case from #12497: https://jsfiddle.net/thysultan/Luktwrdm/264/ |
Btw, there's another potentially related bug that happens if you remove this feature flag override that manifests as an |
Added failing tests in #12508. |
Fixed in #12508 |
Cheers, this PR just saved us from what would have been a confusing day! |
Please file a new issue with a reproducing case. Thanks. |
To everyone who "+1"s the previous comment: sorry, but this doesn't help us solve the issue at all. If you're seeing this after upgrading both |
Running into a strange issue that i cannot reproduce, it happens when running tests in Karma using
16.3.0-alpha.3
The issue is here:
react/packages/react-reconciler/src/ReactFiberScheduler.js
Lines 864 to 877 in 208b490
My test is throwing an error because of a missing
onChange
handler when rendering a checkbox withchecked
but no handler. What appears to be happening is thatnextUnitOfWork
is notnull
and misses the first branch,replayUnitOfWork
is run, after whichnextUnitOfWork
is null andsourceFiber
doesn't exist and so access ofreturn
fails.I've tried for a while to reproduce it, the following codesandbox is a simplified version of the code that is throwing, but the error isn't present there :/ https://codesandbox.io/s/0332y243zp
The text was updated successfully, but these errors were encountered: