mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 12:49:07 +02:00
Refactored firstTick null check
This commit is contained in:
parent
477fc72693
commit
86ca455cb6
@ -126,15 +126,8 @@
|
|||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// We will modify these, so clone for later
|
// We will modify these, so clone for later
|
||||||
if (this.firstTick != null)
|
this.firstTick = (this.firstTick || moment(new Date)).clone();
|
||||||
this.firstTick = this.firstTick.clone();
|
this.lastTick = (this.lastTick || moment(new Date)).clone();
|
||||||
else
|
|
||||||
this.firstTick = moment(new Date);
|
|
||||||
|
|
||||||
if (this.lastTick != null)
|
|
||||||
this.lastTick = this.lastTick.clone();
|
|
||||||
else
|
|
||||||
this.lastTick = moment(new Date);
|
|
||||||
},
|
},
|
||||||
buildTicks: function(index) {
|
buildTicks: function(index) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user