summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/system/js/system.js
diff options
context:
space:
mode:
authorwebchick <drupal@webchick.net>2018-01-03 15:25:46 -0800
committerwebchick <drupal@webchick.net>2018-01-03 15:27:55 -0800
commitf1e33ca3d84ac2251aed144c2587ed9eb2e578fb (patch)
tree261bda9fb2ddf66ed396db34d7a4fff373f5ec63 /core/modules/system/js/system.js
parent9d552cad6cfbe8383b96b74ffc6176503a7b0c2e (diff)
downloaddrupal-f1e33ca3d84ac2251aed144c2587ed9eb2e578fb.tar.gz
drupal-f1e33ca3d84ac2251aed144c2587ed9eb2e578fb.zip
Issue #2925064 by drpal, dawehner, droplet, xjm, webchick, justafish: [1/2] JS codestyle: no-restricted-syntax
Diffstat (limited to 'core/modules/system/js/system.js')
-rw-r--r--core/modules/system/js/system.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/modules/system/js/system.js b/core/modules/system/js/system.js
index d62cc0744630..4bcfe348ed7f 100644
--- a/core/modules/system/js/system.js
+++ b/core/modules/system/js/system.js
@@ -10,11 +10,7 @@
Drupal.behaviors.copyFieldValue = {
attach: function attach(context) {
- for (var sourceId in drupalSettings.copyFieldValue) {
- if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
- ids.push(sourceId);
- }
- }
+ Object.keys(drupalSettings.copyFieldValue || {}).forEach(ids.push);
if (ids.length) {
$('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler);