question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After submitting form, any subsequent typing gives `Uncaught (in promise) TypeError: Cannot convert undefined or null to object` error

See original GitHub issue

Here’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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
garykingcommented, Mar 9, 2020

You sure? I was able to reproduce it in a private window. I’ve made a video below.

I type test in the second field, hit Submit, then type test again in the second field, and one error appears per each character I type, so 4 errors total.

react-hook-form error

0reactions
Cold-A-Musecommented, Jul 28, 2020

Upgrading to version 5.0.3 worked for me as well. Thanks 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found