From 799bc9b844fb3e3cd4909450b638545cf97dac0b Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Tue, 26 Feb 2019 13:39:59 +0100 Subject: [PATCH 1/6] Rename initialDiscussion to firstNote in NoteableDiscussion (cherry picked from commit e9d1393e8d68134e51819c72524cc84265a0acf8) --- .../notes/components/noteable_discussion.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index 9b34c80c78bda9..e6abe233e49137 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -106,7 +106,7 @@ export default { 'showJumpToNextDiscussion', ]), author() { - return this.initialDiscussion.author; + return this.firstNote.author; }, canReply() { return this.getNoteableData.current_user.can_create_note; @@ -117,7 +117,7 @@ export default { hasReplies() { return this.discussion.notes.length > 1; }, - initialDiscussion() { + firstNote() { return this.discussion.notes.slice(0, 1)[0]; }, replies() { @@ -247,7 +247,7 @@ export default { if (this.isReplying) { this.$nextTick(() => { // Pass an extra key to separate reply and note edit forms - this.initAutoSave({ ...this.initialDiscussion, ...this.discussion }, ['Reply']); + this.initAutoSave({ ...this.firstNote, ...this.discussion }, ['Reply']); }); } else { this.disposeAutoSave(); @@ -390,8 +390,8 @@ Please check your network connection and try again.`;