After submitting form, any subsequent typing gives `Uncaught (in promise) TypeError: Cannot convert undefined or null to object` error
See original GitHub issueHere’s my code, in this sandbox.
Submit the form (you need to type something in the second input box). Then type something in the second input box, after submission. There will be a console error of Uncaught (in promise) TypeError: Cannot convert undefined or null to object.
How can this be fixed? Or is this simply a bug of react-hook-form?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cannot convert undefined or null to object - Stack Overflow
This error is caused when you call a function that expects an Object as its argument, but pass undefined or null instead, like...
Read more >Cannot convert undefined or null to Object in JavaScript
The "Cannot convert undefined or null to Object" error occurs when we pass a null or an undefined value to a function that...
Read more >not a valid JSON response - WordPress.org
I am getting the following error(s) when attempting to schedule, edit, ... Uncaught (in promise) TypeError: Cannot convert undefined or null to object...
Read more >typeerror: cannot convert undefined or null to object - You.com
This error is caused when you call a function that expects an Object as its argument, but pass undefined or null instead, like...
Read more >Uncaught TypeError: Cannot convert undefined or null to ...
MyReservations.blade.php. Copy Code <div class="modal-body"> <!-- Room --> <select class="form-control" aria-label="Default select example" id="room_id" > ...
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

You sure? I was able to reproduce it in a private window. I’ve made a video below.
I type
testin the second field, hit Submit, then typetestagain in the second field, and one error appears per each character I type, so 4 errors total.Upgrading to version 5.0.3 worked for me as well. Thanks 😃