diff options
author | Constance Okoghenun <constanceokoghenun@gmail.com> | 2019-02-18 08:16:13 +0100 |
---|---|---|
committer | Constance Okoghenun <constanceokoghenun@gmail.com> | 2019-02-18 08:16:13 +0100 |
commit | 5e137b58ca15f224a3b1b05999e6e689b463417a (patch) | |
tree | 6e76bdb0c5ef988cdb15172a580a56204f8fe404 /app/assets/javascripts/notes/stores/mutations.js | |
parent | 10094950bd5c7adff6888a7835f098a759af5ba4 (diff) | |
download | gitlab-ce-5e137b58ca15f224a3b1b05999e6e689b463417a.tar.gz |
Cancelling reply reverts comment to initial state
When converting a comment to a discussion
if the "Cancel" button is used to exit the new discussion note,
the comment would revert back to its initial state
Diffstat (limited to 'app/assets/javascripts/notes/stores/mutations.js')
-rw-r--r-- | app/assets/javascripts/notes/stores/mutations.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/stores/mutations.js b/app/assets/javascripts/notes/stores/mutations.js index 23ef843bb75..ae6f8b7790a 100644 --- a/app/assets/javascripts/notes/stores/mutations.js +++ b/app/assets/javascripts/notes/stores/mutations.js @@ -269,4 +269,11 @@ export default { const convertedDisscussionIds = [...state.convertedDisscussionIds, discussionId]; Object.assign(state, { convertedDisscussionIds }); }, + + [types.REMOVE_CONVERTED_DISCUSSION](state, discussionId) { + const convertedDisscussionIds = [...state.convertedDisscussionIds]; + + convertedDisscussionIds.splice(convertedDisscussionIds.indexOf(discussionId), 1); + Object.assign(state, { convertedDisscussionIds }); + }, }; |