Skip to content

Commit

Permalink
Fix router issue
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertGrubb committed Jun 12, 2020
1 parent 05728e8 commit c5ba27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CoolApi/Core/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private function route ($route, $method) {
}

// If the route is empty, load the home route.
$route = '/' . $route;
$route = ($route === '/' ? '' : '/') . $route;

/**
* Handle routes with parameters in the URL.
Expand Down

0 comments on commit c5ba27c

Please sign in to comment.