Skip to content

Commit

Permalink
Apply changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Nov 17, 2023
1 parent 48e3a6a commit 031c58a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Component/src/State/Provider/DeserializeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ public function provide(Operation $operation, Context $context): object|array|nu
{
$data = $this->decorated->provide($operation, $context);

// We need request content
if (!$operation instanceof HttpOperation || !($request = $context->get(RequestOption::class)?->request() ?? null)) {
if (!$operation instanceof HttpOperation) {
return $data;
}

$request = $context->get(RequestOption::class)?->request() ?? null;
if (!$request) {
return $data;
}

Expand Down

0 comments on commit 031c58a

Please sign in to comment.