Skip to content

Commit 68df802

Browse files
committed
Fixed issue with RouteCollector adding duplicate routes
1 parent c00a05c commit 68df802

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Router/RouteCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ public function map($route, $name, $handler, array $methods = array('GET'))
116116
foreach ($methods as $method) {
117117
if (null === $name) {
118118
$this->addRoute($method, $route, $handler);
119+
} else {
120+
$this->addNamedRoute($name, $method, $route, $handler);
119121
}
120-
121-
$this->addNamedRoute($name, $method, $route, $handler);
122122
}
123123
}
124124

0 commit comments

Comments
 (0)