diff --git a/core/modules/edit/js/models/EntityModel.js b/core/modules/edit/js/models/EntityModel.js index 74cd6a8..4589882 100644 --- a/core/modules/edit/js/models/EntityModel.js +++ b/core/modules/edit/js/models/EntityModel.js @@ -142,6 +142,7 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ fieldStateChange: function (fieldModel, state) { var entityModel = this; var fieldState = state; + var fieldsInTempStore = this.get('fieldsInTempStore'); // Switch on the entityModel state. // The EntityModel responds to FieldModel state changes as a function of its // state. For example, a field switching back to 'candidate' state when its @@ -172,8 +173,6 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ break; case 'opened': - var fieldsInTempStore = this.get('fieldsInTempStore'); - // Set the isDirty attribute when appropriate so that it is known when // to display the "Save" button in the entity toolbar. // Note that once a field has been changed, there's no way to discard