Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't call notify function without type argument #6767

Closed
nidebo opened this issue Nov 10, 2021 · 3 comments · Fixed by #6768
Closed

Can't call notify function without type argument #6767

nidebo opened this issue Nov 10, 2021 · 3 comments · Fixed by #6768
Labels

Comments

@nidebo
Copy link

nidebo commented Nov 10, 2021

What you were expecting:
Be able to not pass optional argument type to useNotify returned function

What happened instead:
Code breaks because destructuring undefined throws an error.

Steps to reproduce:

const notify = useNotify();
notify();

Environment

  • React-admin version: 3.19.0 and I think will happen on 3.19.1 too.
@WiXSL
Copy link
Contributor

WiXSL commented Nov 10, 2021

Yes, It's been fixed in #6713.

@nidebo
Copy link
Author

nidebo commented Nov 10, 2021

@WiXSL #6760 brought the problem back

@nidebo
Copy link
Author

nidebo commented Nov 10, 2021

opened #6768

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants