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.

watch function throws TypeError under certain conditions

See original GitHub issue

Describe 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:

  1. Go to https://codesandbox.io/s/react-hook-form-usefieldarray-template-ngkqb
  2. Click on ‘append’
  3. See error

Codesandbox link (Required)

https://codesandbox.io/s/react-hook-form-usefieldarray-template-ngkqb

Screenshots

TypeError

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bluebill1049commented, Jul 16, 2020

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.

1reaction
h-sakanocommented, Jul 16, 2020

could you please verify the fix is working: https://codesandbox.io/s/react-hook-form-usefieldarray-template-zkow9?file=/src/index.js:79-84?

@bluebill1049

It works perfectly 🎉 Thank you for your great work!!

Read more comments on GitHub >

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

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