Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / system / js / system.es6.js
index 18153b09ec731a4e5fa4e8b07ce4ea74448f2ae1..3f365d1fad0792504409db1df77ec805c7dfb55b 100644 (file)
     attach(context) {
       // List of fields IDs on which to bind the event listener.
       // Create an array of IDs to use with jQuery.
-      for (const sourceId in drupalSettings.copyFieldValue) {
-        if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
-          ids.push(sourceId);
-        }
-      }
+      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