mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2025-01-03 10:22:11 +01:00
Clone data
This commit is contained in:
parent
f3bf670b5e
commit
ea7a525e53
1 changed files with 5 additions and 1 deletions
|
@ -276,11 +276,15 @@ GitStats.ansiCalendar = function (data, callback) {
|
|||
, strYear = ""
|
||||
, w = 0
|
||||
, d = 0
|
||||
, dataClone = {
|
||||
start: data.start ? Moment(data.start.format(DATE_FORMAT), DATE_FORMAT) : null
|
||||
, end: data.end ? Moment(data.end.format(DATE_FORMAT), DATE_FORMAT) : null
|
||||
}
|
||||
;
|
||||
|
||||
GitStats.calendar(data, function (err, cal) {
|
||||
if (err) { return callback(err); }
|
||||
GitStats.iterateDays(function (cDay, mDay) {
|
||||
GitStats.iterateDays(dataClone, function (cDay, mDay) {
|
||||
sDay = mDay.format("ddd");
|
||||
if (mDay.format("D") === "1") {
|
||||
months.push(mDay.format("MMM"));
|
||||
|
|
Loading…
Reference in a new issue