Skip to content

Commit

Permalink
Merge pull request #10 from RobertGrubb/router-v2
Browse files Browse the repository at this point in the history
Fix router issue
  • Loading branch information
RobertGrubb authored Jun 12, 2020
2 parents 075f3f1 + c5ba27c commit 1ce8588
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 1ce8588

Please sign in to comment.