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