summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-02-26 13:39:59 +0100
committerWinnie Hellmann <winnie@gitlab.com>2019-03-12 12:03:30 +0100
commite9d1393e8d68134e51819c72524cc84265a0acf8 (patch)
tree093769dcc12ce419e5255431e46d989cc299edf8
parenta89df58527aae693438001ab0800363e7a7d6b07 (diff)
downloadgitlab-ce-e9d1393e8d68134e51819c72524cc84265a0acf8.tar.gz
Rename initialDiscussion to firstNote in NoteableDiscussion
-rw-r--r--app/assets/javascripts/notes/components/noteable_discussion.vue14
1 files 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 fc51998935d..fd3cc859545 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.`;
<div class="timeline-content">
<note-header
:author="author"
- :created-at="initialDiscussion.created_at"
- :note-id="initialDiscussion.id"
+ :created-at="firstNote.created_at"
+ :note-id="firstNote.id"
:include-toggle="true"
:expanded="discussion.expanded"
@toggleHandler="toggleDiscussionHandler"
@@ -424,8 +424,8 @@ Please check your network connection and try again.`;
<ul class="notes">
<template v-if="shouldGroupReplies">
<component
- :is="componentName(initialDiscussion)"
- :note="componentData(initialDiscussion)"
+ :is="componentName(firstNote)"
+ :note="componentData(firstNote)"
:line="line"
:commit="commit"
:help-page-path="helpPagePath"