diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 162db808..23b8ff23 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -194,9 +194,10 @@ class Node public function setParameters(): static { $container = Snowflake::getDi(); - + if (empty($this->_handler)){ + return $this; + } $dispatcher = $this->_handler; - unset($this->_handler); if ($dispatcher instanceof Closure) { $this->_injectParameters = $container->resolveFunctionParameters($dispatcher); } else {