Skip to content

Commit c8ea24b

Browse files
committed
Minor cleanup
1 parent 0f4bdcf commit c8ea24b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/ResponseFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ public function render(string $component, $props = []): Response
157157
{
158158
if ($props instanceof Arrayable) {
159159
$props = $props->toArray();
160-
}
161-
162-
if ($props instanceof ProvidesInertiaProps) {
160+
} elseif ($props instanceof ProvidesInertiaProps) {
163161
// Will be resolved in Response::resolveResponsableProperties()
164162
$props = [$props];
165163
}

tests/ResponseFactoryTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,6 @@ public function toArray()
358358
public function test_will_accept_instances_of_provides_inertia_props()
359359
{
360360
Route::middleware([StartSession::class, ExampleMiddleware::class])->get('/', function () {
361-
Inertia::share('foo', 'bar');
362-
363361
return Inertia::render('User/Edit', new class implements ProvidesInertiaProps
364362
{
365363
public function toInertiaProps(RenderContext $context): iterable

0 commit comments

Comments
 (0)