From c648756a36a7ee64fa63bcf4782126503474213d Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 17 Aug 2016 12:18:53 -0600 Subject: [PATCH] Fix more incomplete if/else statements. --- .../diff_notes/components/jump_to_discussion.js.es6 | 2 ++ .../diff_notes/components/resolve_discussion_btn.js.es6 | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6 b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6 index 1c7a0bad68c..64086b5bbde 100644 --- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6 +++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6 @@ -16,6 +16,8 @@ allResolved: function () { if (this.discussion) { return this.unresolvedDiscussionCount === 0; + } else { + return true; } }, showButton: function () { diff --git a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js.es6 b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js.es6 index 7e427cba53e..14cb0168c0e 100644 --- a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js.es6 +++ b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js.es6 @@ -22,11 +22,15 @@ showButton: function () { if (this.discussion) { return this.discussion.isResolvable(); + } else { + return undefined; } }, allResolved: function () { if (this.discussion) { return this.discussion.isResolved(); + } else { + return undefined; } }, buttonText: function () { @@ -39,6 +43,8 @@ loading: function () { if (this.discussion) { return this.discussion.loading; + } else { + return undefined; } } },