diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 3ab6fbc5..23911d3a 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -126,10 +126,9 @@ class Node extends HttpService if (empty($dispatchParam)) { $dispatchParam = [\request()]; } -// if ($this->handler instanceof Closure) { -// return call_user_func($this->handler, ...$dispatchParam); -// } - return call_user_func($this->handler, ...$dispatchParam); + if ($this->handler instanceof Closure) { + return call_user_func($this->handler, ...$dispatchParam); + } return \aop($this->handler, $dispatchParam); }; }