Merge pull request #1814 from hallatore/Bug_SuggestedMinMax

Have to check for undefined because "if (0.0)" would equal false.
This commit is contained in:
Evert Timberg 2015-12-21 14:43:41 -05:00
commit fc3a3aedaf

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); this.min = Math.min(this.min, this.options.ticks.suggestedMin);
} else if (this.options.ticks.min !== undefined) { } else if (this.options.ticks.min !== undefined) {
this.min = this.options.ticks.min; 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); this.max = Math.max(this.max, this.options.ticks.suggestedMax);
} else if (this.options.ticks.max !== undefined) { } else if (this.options.ticks.max !== undefined) {
this.max = this.options.ticks.max; this.max = this.options.ticks.max;