From aad7eeb5e37ab2a3fb894b9f5cc325929e1ad023 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Mon, 9 Jul 2018 08:39:32 +0000 Subject: Merge branch '48906-adding-a-diff-line-note-freezes-the-browser' into 'master' Resolve "Adding a diff line note freezes the browser" Closes #48906 See merge request gitlab-org/gitlab-ce!20476 --- app/assets/javascripts/diffs/components/diff_line_note_form.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/assets/javascripts/diffs/components') diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index 6943b462e86..f48cf80153f 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -59,7 +59,7 @@ export default { } }, methods: { - ...mapActions(['cancelCommentForm', 'saveNote', 'fetchDiscussions']), + ...mapActions(['cancelCommentForm', 'saveNote', 'refetchDiscussionById']), handleCancelCommentForm() { this.autosave.reset(); this.cancelCommentForm({ @@ -78,10 +78,10 @@ export default { }); this.saveNote(postData) - .then(() => { + .then(result => { const endpoint = this.getNotesDataByProp('discussionsPath'); - this.fetchDiscussions(endpoint) + this.refetchDiscussionById({ path: endpoint, discussionId: result.discussion_id }) .then(() => { this.handleCancelCommentForm(); }) -- cgit v1.2.1