summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Rose <sam@gitlab.com>2017-04-12 08:31:56 -0400
committerSam Rose <sam@gitlab.com>2017-04-13 17:22:17 -0400
commitef443a99eea066c644922ea66e5d01ab1ca66743 (patch)
tree2b9d834a72e8cbc8ec04ec49e04f8fd4d76738d7
parentd7a527163b64fa38e46fc6195fef2f5d93e47d07 (diff)
downloadgitlab-ce-30492-using-icon-to-mark-discussion-as-resolved-does-not-resolve-discussion.tar.gz
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js b/app/assets/javascripts/diff_notes/components/resolve_btn.js
index 312f38ce241..dcfc40c1013 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_btn.js
+++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js
@@ -20,8 +20,7 @@ import Vue from 'vue';
data: function () {
return {
discussions: CommentsStore.state,
- loading: false,
- note: {},
+ loading: false
};
},
watch: {
@@ -34,6 +33,9 @@ import Vue from 'vue';
discussion: function () {
return this.discussions[this.discussionId];
},
+ note: function () {
+ return this.discussion ? this.discussion.getNote(this.noteId) : {};
+ },
buttonText: function () {
if (this.isResolved) {
return `Resolved by ${this.resolvedByName}`;
@@ -112,8 +114,6 @@ import Vue from 'vue';
authorAvatar: this.authorAvatar,
noteTruncated: this.noteTruncated,
});
-
- this.note = this.discussion.getNote(this.noteId);
}
});