diff --git a/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php b/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php index b6a0850..8ad3862 100644 --- a/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php +++ b/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php @@ -68,8 +68,7 @@ public function renderResponse(array $main_content, Request $request, RouteMatch $response->addCommand(new InsertCommand(NULL, $html)); $status_messages = array('#type' => 'status_messages'); $output = $this->drupalRenderRoot($status_messages); - $output_trimmed = trim($output); - if (!empty($output_trimmed) && $output_trimmed != '') { + if (trim($output) != '') { // There are messages so output them exactly as the theme renders them. $response->addCommand(new PrependCommand(NULL, $output)); }