aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/components/DiffCommitSelector.vue
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/components/DiffCommitSelector.vue')
-rw-r--r--web_src/js/components/DiffCommitSelector.vue2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/components/DiffCommitSelector.vue b/web_src/js/components/DiffCommitSelector.vue
index 6a4a84f615..53e0bce76c 100644
--- a/web_src/js/components/DiffCommitSelector.vue
+++ b/web_src/js/components/DiffCommitSelector.vue
@@ -132,7 +132,7 @@ export default {
}));
this.commits.reverse();
this.lastReviewCommitSha = results.last_review_commit_sha || null;
- if (this.lastReviewCommitSha && this.commits.findIndex((x) => x.id === this.lastReviewCommitSha) === -1) {
+ if (this.lastReviewCommitSha && !this.commits.some((x) => x.id === this.lastReviewCommitSha)) {
// the lastReviewCommit is not available (probably due to a force push)
// reset the last review commit sha
this.lastReviewCommitSha = null;