diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 21:07:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 21:07:48 +0300 |
commit | e32f083f49a50ee2f7c217eb0d51d759958145f3 (patch) | |
tree | 0624191ff758f73b7a19ff30daf539e6210b6cc0 /app/assets/javascripts/diffs | |
parent | 6997e3f3d0a714bc67df268989fb089c943330cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r-- | app/assets/javascripts/diffs/components/diff_line_note_form.vue | 8 |
1 files changed, 6 insertions, 2 deletions
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 a2f0e2c2653..ebc68bafb9a 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -3,6 +3,7 @@ import { mapState, mapGetters, mapActions } from 'vuex'; import { s__, __ } from '~/locale'; import diffLineNoteFormMixin from '~/notes/mixins/diff_line_note_form'; import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal'; +import { ignoreWhilePending } from '~/lib/utils/ignore_while_pending'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import MultilineCommentForm from '~/notes/components/multiline_comment_form.vue'; import { commentLineOptions, formatLineRange } from '~/notes/components/multiline_comment_utils'; @@ -175,7 +176,10 @@ export default { 'saveDiffDiscussion', 'setSuggestPopoverDismissed', ]), - async handleCancelCommentForm(shouldConfirm, isDirty) { + handleCancelCommentForm: ignoreWhilePending(async function handleCancelCommentForm( + shouldConfirm, + isDirty, + ) { if (shouldConfirm && isDirty) { const msg = s__('Notes|Are you sure you want to cancel creating this comment?'); @@ -195,7 +199,7 @@ export default { this.$nextTick(() => { this.resetAutoSave(); }); - }, + }), handleSaveNote(note) { return this.saveDiffDiscussion({ note, formData: this.formData }).then(() => this.handleCancelCommentForm(), |