Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / quickedit / js / models / FieldModel.es6.js
index 776c331f32fd7b75ab5c3ddbb66ce37ffa0a9a76..0c01cc30240678fb10049246bcf2330d35effd5f 100644 (file)
         // 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());
           }
         });