Issue #2914718 by droplet, alexpott, nod_, dawehner: JS codestyle: no-empty

8.5.x
xjm 2017-10-13 19:10:51 -05:00
parent 58c46869be
commit 7655c87004
3 changed files with 5 additions and 13 deletions

View File

@ -8,7 +8,6 @@
"no-restricted-syntax": "off",
"no-new": "off",
"no-multi-assign": "off",
"no-empty": "off",
"no-continue": "off",
"new-cap": "off",
"max-len": "off",

View File

@ -218,15 +218,8 @@
// different view mode).
.where({ logicalFieldID: currentField.get('logicalFieldID') })
.forEach((field) => {
// Ignore the current field.
if (field === currentField) {
}
// Also ignore other fields with the same view mode.
else if (field.get('fieldID') === currentField.get('fieldID')) {
}
else {
// Ignore the current field and other fields with the same view mode.
if (field !== currentField && field.get('fieldID') !== currentField.get('fieldID')) {
otherViewModes.push(field.getViewMode());
}
});

View File

@ -72,9 +72,9 @@
var currentField = this;
var otherViewModes = [];
Drupal.quickedit.collections.fields.where({ logicalFieldID: currentField.get('logicalFieldID') }).forEach(function (field) {
if (field === currentField) {} else if (field.get('fieldID') === currentField.get('fieldID')) {} else {
otherViewModes.push(field.getViewMode());
}
if (field !== currentField && field.get('fieldID') !== currentField.get('fieldID')) {
otherViewModes.push(field.getViewMode());
}
});
return otherViewModes;
}