This commit is contained in:
2020-09-27 14:41:25 +08:00
parent 1fdc594cbb
commit 510349d6d4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class Node extends Application
* @param $response * @param $response
* @return mixed|null * @return mixed|null
*/ */
public function afterDispatch($response) public function afterDispatch($response = null)
{ {
return Coroutine::create(function ($request, $response) { return Coroutine::create(function ($request, $response) {
(Reduce::after($this->_after))($request, $response); (Reduce::after($this->_after))($request, $response);
+1 -1
View File
@@ -434,7 +434,7 @@ class Router extends Application implements RouterInterface
if (!($node instanceof Node) || !$node->hasAfter()) { if (!($node instanceof Node) || !$node->hasAfter()) {
return; return;
} }
$node->afterDispatch($response); $node->afterDispatch($response ?? null);
} }
} }