summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jvargas@gitlab.com>2018-05-31 17:07:16 -0500
committerJose <jvargas@gitlab.com>2018-06-01 12:25:56 -0500
commit763612c2f0e9b43e98c52a576ba4bdfbc0d64be6 (patch)
tree7d44f5b03bed86945b44f1674e9f6160ea946e82
parent3c1ee7248fa92c097a9b0c85cf9fa32a8372034c (diff)
downloadgitlab-ce-jivl-smarter-system-notes.tar.gz
change let to constjivl-smarter-system-notes
-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;
}
}