Cannot read property 'return' of null
See original GitHub issueRunning 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:
My test is throwing an error because of a missing onChange
handler when rendering a checkbox with checked
but no handler. What appears to be happening is that nextUnitOfWork
is not null
and misses the first branch, replayUnitOfWork
is run, after which nextUnitOfWork
is null and sourceFiber
doesn’t exist and so access of return
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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >Uncaught TypeError: Cannot read property 'value' of null
I'm getting error in this code, I'm trying to do an event where in when the page is load, it will do the...
Read more >How to deal with TypeError: cannot read properties of null
While coding in Javascript, you must have at least once received a Type Error which has the message “cannot read properties of null”....
Read more >TypeError: Cannot read property 'value' of Null in JS
To solve the "Cannot read property 'value' of null" error, make sure that the JS script tag is placed at the bottom of...
Read more >Uncaught TypeError Cannot read property value of null
I have been getting an ERROR in the code as I'm trying to do an event where when the page is loaded, it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve upgraded to React v16.3.2 and am seeing a similar error:
It’s referencing a similar area of the React codebase, without a null check:
Fixed in https://github.com/facebook/react/pull/12508