summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/static_site_editor/store/mutations.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/static_site_editor/store/mutations.js')
-rw-r--r--app/assets/javascripts/static_site_editor/store/mutations.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/static_site_editor/store/mutations.js b/app/assets/javascripts/static_site_editor/store/mutations.js
index 4727d04439c..72fe71f1c9b 100644
--- a/app/assets/javascripts/static_site_editor/store/mutations.js
+++ b/app/assets/javascripts/static_site_editor/store/mutations.js
@@ -19,13 +19,18 @@ export default {
},
[types.SUBMIT_CHANGES](state) {
state.isSavingChanges = true;
+ state.submitChangesError = '';
},
[types.SUBMIT_CHANGES_SUCCESS](state, meta) {
state.savedContentMeta = meta;
state.isSavingChanges = false;
state.originalContent = state.content;
},
- [types.SUBMIT_CHANGES_ERROR](state) {
+ [types.SUBMIT_CHANGES_ERROR](state, error) {
+ state.submitChangesError = error;
state.isSavingChanges = false;
},
+ [types.DISMISS_SUBMIT_CHANGES_ERROR](state) {
+ state.submitChangesError = '';
+ },
};