Skip to content

Commit be2d293

Browse files
committed
prevent error when response is no json response
1 parent 6dc92a4 commit be2d293

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Middleware/DebugBarMeta.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public function handle($request, Closure $next): Response
1818
/** @var JsonResponse $response */
1919
$response = $next($request);
2020

21+
if (! $response instanceof JsonResponse) {
22+
return $response;
23+
}
24+
2125
$data = $response->getData();
2226

2327
$debugData = new \StdClass;

0 commit comments

Comments
 (0)