Skip to content

Commit 07891d9

Browse files
Default to true for _api_respond attribute
Co-Authored-By: teohhanhui <[email protected]>
1 parent 3208c8d commit 07891d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventListener/SerializeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
4747
$controllerResult = $event->getControllerResult();
4848
$request = $event->getRequest();
4949

50-
if ($controllerResult instanceof Response || !$request->attributes->get('_api_respond')) {
50+
if ($controllerResult instanceof Response || !$request->attributes->get('_api_respond', true)) {
5151
return;
5252
}
5353

0 commit comments

Comments
 (0)