From 2728e4ae3044036f3cd78a6dd17677d9b108e50c Mon Sep 17 00:00:00 2001 From: Eric Gillingham Date: Wed, 16 Oct 2013 14:44:14 -0700 Subject: [PATCH] Fix dataSet parsing of Moment objects Calling just moment.clone() won't do anything but error. Since moment.isMoment(object) guarantees object is already a moment instance, just calling moment(object) will clone it per the moment docs http://momentjs.com/docs/#/parsing/moment-clone/ --- src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.js b/src/util.js index 70c907a4..95dcafbc 100644 --- a/src/util.js +++ b/src/util.js @@ -171,7 +171,7 @@ util.convert = function convert(object, type) { return moment(object.valueOf()); } else if (moment.isMoment(object)) { - return moment.clone(); + return moment(object); } if (util.isString(object)) { match = ASPDateRegex.exec(object);