Have to check for undefined because "if (0.0)" would equal false.

This commit is contained in:
Tore Lervik 2015-12-21 20:28:20 +01:00
parent 63b14dc2a9
commit 3577d959d0

View File

@ -129,13 +129,13 @@
}
}
if (this.options.ticks.suggestedMin) {
if (this.options.ticks.suggestedMin !== undefined) {
this.min = Math.min(this.min, this.options.ticks.suggestedMin);
} else if (this.options.ticks.min !== undefined) {
this.min = this.options.ticks.min;
}
if (this.options.ticks.suggestedMax) {
if (this.options.ticks.suggestedMax !== undefined) {
this.max = Math.max(this.max, this.options.ticks.suggestedMax);
} else if (this.options.ticks.max !== undefined) {
this.max = this.options.ticks.max;