Clone data

This commit is contained in:
Ionică Bizău 2015-02-09 11:51:48 +02:00
parent f3bf670b5e
commit ea7a525e53

View file

@ -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"));