From 3840ad24dc91f3eeb97f50bcf81a9d2e21682a1c Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Mon, 12 Feb 2018 10:45:21 +0000
Subject: [PATCH] Issue #2941106 by droplet, idebr: Site email address in the
 install profile form is no longer copied to the user email address

---
 core/modules/system/js/system.es6.js | 5 ++++-
 core/modules/system/js/system.js     | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/core/modules/system/js/system.es6.js b/core/modules/system/js/system.es6.js
index 51007662e3c3..3f365d1fad07 100644
--- a/core/modules/system/js/system.es6.js
+++ b/core/modules/system/js/system.es6.js
@@ -23,7 +23,10 @@
     attach(context) {
       // List of fields IDs on which to bind the event listener.
       // Create an array of IDs to use with jQuery.
-      Object.keys(drupalSettings.copyFieldValue || {}).forEach(ids.push);
+      Object.keys(drupalSettings.copyFieldValue || {}).forEach((element) => {
+        ids.push(element);
+      });
+
       if (ids.length) {
         // Listen to value:copy events on all dependent fields.
         // We have to use body and not document because of the way jQuery events
diff --git a/core/modules/system/js/system.js b/core/modules/system/js/system.js
index 4bcfe348ed7f..f23a69a93714 100644
--- a/core/modules/system/js/system.js
+++ b/core/modules/system/js/system.js
@@ -10,7 +10,10 @@
 
   Drupal.behaviors.copyFieldValue = {
     attach: function attach(context) {
-      Object.keys(drupalSettings.copyFieldValue || {}).forEach(ids.push);
+      Object.keys(drupalSettings.copyFieldValue || {}).forEach(function (element) {
+        ids.push(element);
+      });
+
       if (ids.length) {
         $('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler);
 
-- 
GitLab