Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes/stores/collapse_utils.js')
-rw-r--r--app/assets/javascripts/notes/stores/collapse_utils.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes/stores/collapse_utils.js b/app/assets/javascripts/notes/stores/collapse_utils.js
index addf0b9240c..fa4a1c56b20 100644
--- a/app/assets/javascripts/notes/stores/collapse_utils.js
+++ b/app/assets/javascripts/notes/stores/collapse_utils.js
@@ -32,10 +32,9 @@ export const changeDescriptionNote = (note, descriptionChangedTimes, timeDiffere
export const getTimeDifferenceMinutes = (noteBeggining, noteEnd) => {
const descriptionNoteBegin = new Date(noteBeggining.created_at);
const descriptionNoteEnd = new Date(noteEnd.created_at);
- let timeDifferenceMinutes = (descriptionNoteEnd - descriptionNoteBegin) / 1000 / 60;
- timeDifferenceMinutes = Math.ceil(timeDifferenceMinutes);
+ const timeDifferenceMinutes = (descriptionNoteEnd - descriptionNoteBegin) / 1000 / 60;
- return timeDifferenceMinutes;
+ return Math.ceil(timeDifferenceMinutes);
};
/**
@@ -95,8 +94,7 @@ export const collapseSystemNotes = notes => {
changeDescriptionNote(note, descriptionChangedTimes, timeDifferenceMinutes),
);
- // update the previous system note
- lastDescriptionSystemNote = note;
+ // update the previous system note index
lastDescriptionSystemNoteIndex = acc.length;
}
}