]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Added a null-check in moment()
authorJens Alm <jens.alm@mac.com>
Sat, 12 Nov 2011 11:57:23 +0000 (12:57 +0100)
committerJens Alm <jens.alm@mac.com>
Sat, 12 Nov 2011 11:57:23 +0000 (12:57 +0100)
moment.js

index 0a74fdc872cd3f08081bc419d6e643ac6bbaae7c..ae4fecf0b74ebb81f8bd4d142f5bc84897c2cfca 100644 (file)
--- a/moment.js
+++ b/moment.js
     }
 
     moment = function (input, format) {
+               if (input === null) {
+                       return null
+               }
         var date;
         // parse UnderscoreDate object
         if (input && input._d instanceof Date) {