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

Fix usePage() null object error in Vue 3 adapter #1530

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

onlime
Copy link
Contributor

@onlime onlime commented Apr 20, 2023

follow-up fix for #1469, as proposed by @reinink

I have tested this with a local build and all is working as expected again.

--

@reinink comments:

This PR fixes situations where the usePage() hook is used before Inertia has been initialized — for example in 3rd party libraries. In these situations the internal page ref in the root <App> component is still null, which results in an error because it's trying to find props, url, component, etc. properties on a null object.

@reinink reinink changed the title Fix broken usePage() after vue3 reactivity fix Fix usePage() null object error in Vue 3 adapter Apr 21, 2023
@reinink reinink merged commit e164c03 into inertiajs:master Apr 21, 2023
@reinink
Copy link
Member

reinink commented Apr 21, 2023

Hey, thanks for putting that together!

@onlime
Copy link
Contributor Author

onlime commented Apr 21, 2023

@reinink Hey, thanks for the explanation and fast response!

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

Successfully merging this pull request may close these issues.

2 participants