diff options
author | Fatih Acet <acetfatih@gmail.com> | 2018-07-12 00:36:00 +0200 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2018-07-18 12:55:56 +0200 |
commit | 5f7a81c441a40203ae0a33ea8419028b08631caf (patch) | |
tree | 74b9c2a9825b77b4270ddac1820b4e13f8a9f251 | |
parent | 8b34b26ac90839645cdb7baeec82b6713009999a (diff) | |
download | gitlab-ce-5f7a81c441a40203ae0a33ea8419028b08631caf.tar.gz |
Fix isDirty check of noteable discussion.
-rw-r--r-- | app/assets/javascripts/notes/components/noteable_discussion.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index bee635398b3..0216869d36f 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -194,16 +194,16 @@ export default { showReplyForm() { this.isReplying = true; }, - cancelReplyForm(shouldConfirm) { - if (shouldConfirm && this.$refs.noteForm.isDirty) { + cancelReplyForm(shouldConfirm, isDirty) { + if (shouldConfirm && isDirty) { // eslint-disable-next-line no-alert if (!window.confirm('Are you sure you want to cancel creating this comment?')) { return; } } - this.resetAutoSave(); this.isReplying = false; + this.resetAutoSave(); }, saveReply(noteText, form, callback) { const postData = { |