From: Jens Alm Date: Sat, 12 Nov 2011 11:57:23 +0000 (+0100) Subject: Added a null-check in moment() X-Git-Tag: 1.1.2~22^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c48e91a930cee411aa7e22ae4136d31c77a2a754;p=thirdparty%2Fmoment.git Added a null-check in moment() --- diff --git a/moment.js b/moment.js index 0a74fdc87..ae4fecf0b 100644 --- a/moment.js +++ b/moment.js @@ -304,6 +304,9 @@ } moment = function (input, format) { + if (input === null) { + return null + } var date; // parse UnderscoreDate object if (input && input._d instanceof Date) {