Overrides \Drupal\views\Plugin\views\display\PathPluginBase::execute().
Overrides PathPluginBase::execute
public function execute() {
parent::execute();
$output = $this->view
->render();
if (empty($output)) {
throw new NotFoundHttpException();
}
$response = $this->view
->getResponse();
$response
->setContent($output);
return $response;
}