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

TypeError: Cannot read properties of undefined (reading 'version') results in DeferredProps not loading in #2219

Closed
Verox001 opened this issue Jan 29, 2025 · 2 comments
Labels
react Related to the react adapter

Comments

@Verox001
Copy link

Verox001 commented Jan 29, 2025

Version:

  • @inertiajs/react version: 2.0.3

Describe the problem:

When visiting a page that uses deferred props and doing a request using useForm, the following error occurs:
"TypeError: Cannot read properties of undefined (reading 'version')"
Image

The error results in the deferred props staying undefined, which is the actual issue.

Steps to reproduce:

  1. Clone the branche I created to reproduce the issue: https://github.com/Verox001/inertia/tree/version-on-undefined
  2. Run the react playground environment with the 2.0.3 core as described in the contributor guide.
  3. Visit the Defer page and have a look in the console. You should see the error and the deferred props not being sent to the frontend, therefore staying at "Loading..."
@Verox001 Verox001 added the react Related to the react adapter label Jan 29, 2025
@Verox001
Copy link
Author

The hydration problem can be ignored as it comes with the playground environment itself.

@Verox001 Verox001 changed the title TypeError: Cannot read properties of undefined (reading 'version') TypeError: Cannot read properties of undefined (reading 'version') results in DeferredProps not loading in Jan 30, 2025
@Verox001
Copy link
Author

Verox001 commented Feb 1, 2025

Copy of #2221. Also solved in the Pull Request #2223.

@Verox001 Verox001 closed this as completed Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react Related to the react adapter
Projects
None yet
Development

No branches or pull requests

1 participant