From 3a909ec56945357aa074c1f4b268c8d995bcde20 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Fri, 19 Feb 2010 17:57:34 -0800 Subject: [PATCH] catch NaN dates like new Date("2009/10/00") in parseArray_ --- dygraph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dygraph.js b/dygraph.js index ba2f31e..6b1a99c 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1807,7 +1807,8 @@ Dygraph.prototype.parseArray_ = function(data) { return null; } if (parsedData[i][0] == null - || typeof(parsedData[i][0].getTime) != 'function') { + || typeof(parsedData[i][0].getTime) != 'function' + || isNaN(parsedData[i][0].getTime())) { this.error("x value in row " << (1 + i) << " is not a Date"); return null; } -- 2.7.4