diff options
Diffstat (limited to 'app/assets/javascripts/diffs/utils/file_reviews.js')
-rw-r--r-- | app/assets/javascripts/diffs/utils/file_reviews.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/utils/file_reviews.js b/app/assets/javascripts/diffs/utils/file_reviews.js index 5fafc1714ae..7a4b1aa6b17 100644 --- a/app/assets/javascripts/diffs/utils/file_reviews.js +++ b/app/assets/javascripts/diffs/utils/file_reviews.js @@ -9,7 +9,12 @@ export function isFileReviewed(reviews, file) { } export function reviewStatuses(files, reviews) { - return files.map((file) => isFileReviewed(reviews, file)); + return files.reduce((flat, file) => { + return { + ...flat, + [file.id]: isFileReviewed(reviews, file), + }; + }, {}); } export function getReviewsForMergeRequest(mrPath) { |