Commit 6de9fc1d authored by Tomas Vik's avatar Tomas Vik

Use diff metadata to find out when to send diff-files-end perf mark

We were using `state.diffs.length` to find out whether the index
of diff item is the last of all diffs. But the `state.diffs.length`
doesn't reflect the total, but only the number of currently
fetched items. This change uses `diffFilesLength` instead, which is
taken from the diff metadata and reflects the total number of changed
files.
parent ed8b8224
...@@ -522,7 +522,7 @@ export default { ...@@ -522,7 +522,7 @@ export default {
:file="file" :file="file"
:reviewed="fileReviews[index]" :reviewed="fileReviews[index]"
:is-first-file="index === 0" :is-first-file="index === 0"
:is-last-file="index === diffs.length - 1" :is-last-file="index === diffFilesLength - 1"
:help-page-path="helpPagePath" :help-page-path="helpPagePath"
:can-current-user-fork="canCurrentUserFork" :can-current-user-fork="canCurrentUserFork"
:view-diffs-file-by-file="viewDiffsFileByFile" :view-diffs-file-by-file="viewDiffsFileByFile"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment