Skip to content

Commit 756e8c5

Browse files
fix if statement...
1 parent 43fae97 commit 756e8c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/router/src/HandleRouteExceptionMiddleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ private function forward(Request $request, HttpMiddlewareCallable $next): Respon
5252
} catch (ConvertsToResponse $convertsToResponse) {
5353
return $convertsToResponse->toResponse();
5454
} catch (RouteBindingFailed) {
55-
if (! $this->wantsJson($request)) {
55+
if ($this->wantsJson($request)) {
5656
return new NotFound([
5757
'message' => 'The requested resource was not found.',
5858
]);
5959
}
6060

6161
return new NotFound();
6262
} catch (ValidationFailed $validationException) {
63-
if (! $this->wantsJson($request)) {
63+
if ($this->wantsJson($request)) {
6464
return new Json([
6565
'message' => $validationException->getMessage(),
6666
'errors' => $validationException->errorMessages,

0 commit comments

Comments
 (0)