watch function throws TypeError under certain conditions
See original GitHub issueDescribe the bug
‘watch’ throws TypeError when the defaultValue
of the Controller component is null
.
This issue has occurred since 6.0.6 and not until 6.0.5.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/react-hook-form-usefieldarray-template-ngkqb
- Click on ‘append’
- See error
Codesandbox link (Required)
https://codesandbox.io/s/react-hook-form-usefieldarray-template-ngkqb
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to throw an exception - Python Morsels
You can make an exception object by calling an exception class, passing in a helpful error message.
Read more >Watch.js only unwatching in certain conditions? - Stack Overflow
So the final answer to this is as below. const express = require('express'); const app = express(); const expressWs ...
Read more >Python Exceptions: An Introduction - Real Python
In this beginner tutorial you'll learn what exceptions are good for in Python. You'll see how to raise exceptions and how to handle...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >Python Exceptions (With Examples) - Programiz
In this tutorial, we will learn about exceptions in Python. ... TypeError, Raised when a function or operation is applied to an object...
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
Thanks very much, @h-sakano for the reporting and detailed issue. I will follow it up with some unit test and release the patch soon.
@bluebill1049
It works perfectly 🎉 Thank you for your great work!!