diff options
Diffstat (limited to 'app/assets/javascripts/diff_notes/components/resolve_btn.js')
-rw-r--r-- | app/assets/javascripts/diff_notes/components/resolve_btn.js | 8 |
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); } }); |