diff options
Diffstat (limited to 'core/modules/system/js/system.es6.js')
-rw-r--r-- | core/modules/system/js/system.es6.js | 5 |
1 files changed, 4 insertions, 1 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 |