diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-03-06 14:39:53 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-03-06 17:19:27 +0800 |
commit | d72a61b41d1aaf6b0ed9041b32fa411e8907d4f8 (patch) | |
tree | 670f9846a5283e69d90317bef39120d580c3a92e /app | |
parent | ab391b779ecf95b3a333dac0c247354c0ef92605 (diff) | |
download | gitlab-ce-d72a61b41d1aaf6b0ed9041b32fa411e8907d4f8.tar.gz |
Handle transformed notes from polling response
Transforms notes when the note was transformed in some other tab
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/notes/stores/mutations.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/stores/mutations.js b/app/assets/javascripts/notes/stores/mutations.js index ae6f8b7790a..fa44ef2d057 100644 --- a/app/assets/javascripts/notes/stores/mutations.js +++ b/app/assets/javascripts/notes/stores/mutations.js @@ -193,6 +193,10 @@ export default { const noteObj = utils.findNoteObjectById(state.discussions, note.discussion_id); if (noteObj.individual_note) { + if (note.type === constants.DISCUSSION_NOTE) { + noteObj.individual_note = false; + } + noteObj.notes.splice(0, 1, note); } else { const comment = utils.findNoteObjectById(noteObj.notes, note.id); |