diff --git a/core/lib/Drupal/Core/Ajax/AjaxResponse.php b/core/lib/Drupal/Core/Ajax/AjaxResponse.php
index 111c1ed1a26a52bea2c9c49504f7793cae153e4a..83124e8fa2da535a295cbc5f9315aa11c6466f1f 100644
--- a/core/lib/Drupal/Core/Ajax/AjaxResponse.php
+++ b/core/lib/Drupal/Core/Ajax/AjaxResponse.php
@@ -55,8 +55,7 @@ public function addCommand($command, $prepend = FALSE) {
    *   Response The current response.
    */
   public function prepare(Request $request) {
-
-    parent::setData($this->ajaxRender($request));
+    $this->setData($this->ajaxRender($request));
     return parent::prepare($request);
   }