From 3577d959d09ee9552b6f1bbba0c7beb5eedc4a70 Mon Sep 17 00:00:00 2001 From: Tore Lervik Date: Mon, 21 Dec 2015 20:28:20 +0100 Subject: [PATCH] Have to check for undefined because "if (0.0)" would equal false. --- src/scales/scale.linear.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scales/scale.linear.js b/src/scales/scale.linear.js index d453b2c7e..68cbf2e0f 100644 --- a/src/scales/scale.linear.js +++ b/src/scales/scale.linear.js @@ -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;