Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / quickedit / js / models / EntityModel.js
index 3c55c6ab417dbe5e0d383000e4d7ef37498039f6..71da827ace73fc16fbd78f8c30b382c8496ac246 100644 (file)
                 error: function error() {
                   entityModel.set('isCommitting', false);
 
-                  entityModel.set('state', 'opened', { reason: 'networkerror' });
+                  entityModel.set('state', 'opened', {
+                    reason: 'networkerror'
+                  });
 
                   var message = Drupal.t('Your changes to <q>@entity-title</q> could not be saved, either due to a website problem or a network connection problem.<br>Please try again.', { '@entity-title': entityModel.get('label') });
                   Drupal.quickedit.util.networkErrorModal(Drupal.t('Network problem!'), message);
 
         if (!this._acceptStateChange(currentState, nextState, options)) {
           return 'state change not accepted';
-        } else if (!this._fieldsHaveAcceptableStates(acceptedFieldStates)) {
-            return 'state change not accepted because fields are not in acceptable state';
-          }
+        }
+
+        if (!this._fieldsHaveAcceptableStates(acceptedFieldStates)) {
+          return 'state change not accepted because fields are not in acceptable state';
+        }
       }
 
       var currentIsCommitting = this.get('isCommitting');