diff options
author | Jose <jvargas@gitlab.com> | 2018-05-31 17:07:16 -0500 |
---|---|---|
committer | Jose <jvargas@gitlab.com> | 2018-06-01 12:25:56 -0500 |
commit | 763612c2f0e9b43e98c52a576ba4bdfbc0d64be6 (patch) | |
tree | 7d44f5b03bed86945b44f1674e9f6160ea946e82 | |
parent | 3c1ee7248fa92c097a9b0c85cf9fa32a8372034c (diff) | |
download | gitlab-ce-jivl-smarter-system-notes.tar.gz |
change let to constjivl-smarter-system-notes
-rw-r--r-- | app/assets/javascripts/notes/stores/collapse_utils.js | 8 |
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; } } |