From: Jan Dudek Date: Fri, 22 Feb 2013 08:17:09 +0000 (+0100) Subject: Fixed missing cloning of moment in toJSON method X-Git-Tag: 2.1.0~57^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F646%2Fhead;p=thirdparty%2Fmoment.git Fixed missing cloning of moment in toJSON method --- diff --git a/moment.js b/moment.js index 12b2794a4..9ce5b1e87 100644 --- a/moment.js +++ b/moment.js @@ -1059,7 +1059,7 @@ }, toJSON : function () { - return this.utc().format('YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + return moment(this).utc().format('YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); }, toArray : function () {