Fix isDirty check of noteable discussion.

This commit is contained in:
Fatih Acet 2018-07-12 00:36:00 +02:00
parent 8b34b26ac9
commit 5f7a81c441
No known key found for this signature in database
GPG key ID: E994FE39E29B7E11

View file

@ -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 = {