From 031c58a9f7623b0de2fc1dc3f2c693e678423745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Thu, 16 Nov 2023 08:50:38 +0100 Subject: [PATCH] Apply changes from code review --- src/Component/src/State/Provider/DeserializeProvider.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Component/src/State/Provider/DeserializeProvider.php b/src/Component/src/State/Provider/DeserializeProvider.php index 865787d74..df42cea0b 100644 --- a/src/Component/src/State/Provider/DeserializeProvider.php +++ b/src/Component/src/State/Provider/DeserializeProvider.php @@ -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; }