Skip to content

Commit 9f00dcd

Browse files
Ange7Alexbarryvdh
authored
Add test to check if $data['component'] exist (#1516)
* Add test to check if $data['component'] exist * Update ViewCollector.php --------- Co-authored-by: Alex <[email protected]> Co-authored-by: Barry vd. Heuvel <[email protected]>
1 parent 60d3f5d commit 9f00dcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataCollector/ViewCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function addView(View $view)
6868
// Prevent duplicates
6969
$hash = $type . $path . $name . $this->collect_data ? implode(array_keys($view->getData())) : '';
7070

71-
if (class_exists('\Inertia\Inertia') && isset($data['page'])) {
71+
if (class_exists('\Inertia\Inertia') && isset($data['page'], $data['component'])) {
7272
$data = $data['page'];
7373
$name = $data['component'];
7474

0 commit comments

Comments
 (0)