summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2018-07-12 00:36:00 +0200
committerFatih Acet <acetfatih@gmail.com>2018-07-18 12:55:56 +0200
commit5f7a81c441a40203ae0a33ea8419028b08631caf (patch)
tree74b9c2a9825b77b4270ddac1820b4e13f8a9f251
parent8b34b26ac90839645cdb7baeec82b6713009999a (diff)
downloadgitlab-ce-5f7a81c441a40203ae0a33ea8419028b08631caf.tar.gz
Fix isDirty check of noteable discussion.
-rw-r--r--app/assets/javascripts/notes/components/noteable_discussion.vue6
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 = {