This commit is contained in:
2021-08-04 15:32:15 +08:00
parent c2a974a58e
commit 5366629e26
+5 -4
View File
@@ -213,10 +213,11 @@ class Response extends HttpService
if (empty($this->endData) || is_string($this->endData)) {
return $this->endData;
}
$class = Response::FORMAT_MAPS[$this->format] ?? HtmlFormatter::class;
return \di($class)->send($this->endData)->getData();
if (!($this->endData instanceof Response)) {
$class = Response::FORMAT_MAPS[$this->format] ?? HtmlFormatter::class;
return \di($class)->send($this->endData)->getData();
}
return $this->endData->getContent();
}