This commit is contained in:
2021-04-28 10:23:16 +08:00
parent 71084f9102
commit 62a3c4bfc2
+2 -1
View File
@@ -487,7 +487,8 @@ class Router extends HttpService implements RouterInterface
*/
public function dispatch(): mixed
{
if (!($node = $this->find_path(\request()))) {
$node = $this->find_path(\request());
if (!($node instanceof Node)) {
return send(self::NOT_FOUND);
}
send(($response = $node->dispatch()), 200);