From 68259d8d678f6b4e74f2d2282a86af007caacef9 Mon Sep 17 00:00:00 2001 From: Eric Gillingham Date: Wed, 16 Oct 2013 14:32:21 -0700 Subject: [PATCH] Fix DataSet Moment conversion. Calling object.clone() will fail if object is already a moment instance. Calling moment(object) will clone it per tehe 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 d09a82a9..5bf4fd16 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(moment); } if (util.isString(object)) { match = ASPDateRegex.exec(object);