-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix #1516, check inertia component array key #1525
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
Conversation
Should page.component also be used then? |
No,
|
src/DataCollector/ViewCollector.php
Outdated
@@ -68,7 +68,7 @@ public function addView(View $view) | |||
// Prevent duplicates | |||
$hash = $type . $path . $name . $this->collect_data ? implode(array_keys($view->getData())) : ''; | |||
|
|||
if (class_exists('\Inertia\Inertia') && isset($data['page'], $data['component'])) { | |||
if (class_exists('\Inertia\Inertia') && isset($data['page'], $data['page']['component'])) { | |||
$data = $data['page']; | |||
$name = $data['component']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should this be $data['page']['component']
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah okay, that's what I meant :P I'm just not sure how the Inertia config looks like. Don't have a demo project ready, but will try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same problem, i just follow user indications
#1389 (comment)
You could add the other keys(props/version
) for more security, although I think it would not be necessary
Wait, Now that I'm investigating Inertia, I see that there are some things missing to have full support |
fix #1516