Refactored firstTick null check

This commit is contained in:
Tore Lervik 2015-12-21 22:40:33 +01:00
parent 477fc72693
commit 86ca455cb6

View File

@ -126,15 +126,8 @@
}, this);
// We will modify these, so clone for later
if (this.firstTick != null)
this.firstTick = this.firstTick.clone();
else
this.firstTick = moment(new Date);
if (this.lastTick != null)
this.lastTick = this.lastTick.clone();
else
this.lastTick = moment(new Date);
this.firstTick = (this.firstTick || moment(new Date)).clone();
this.lastTick = (this.lastTick || moment(new Date)).clone();
},
buildTicks: function(index) {