diff app/lib/Helpers.js @ 402:60a2812568cb

Fixed converting dates from timestamp to date object to allow empty(NULL) values.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 06 Sep 2013 12:53:19 +0200
parents 1e1ee8abf91b
children debfcc7713e3
line wrap: on
line diff
--- a/app/lib/Helpers.js	Wed Sep 04 09:57:07 2013 +0200
+++ b/app/lib/Helpers.js	Fri Sep 06 12:53:19 2013 +0200
@@ -9,6 +9,9 @@
          */
         ts2date: function(v, record){
             // Converts a timestamp into a date object.
+            if (v === null || v === undefined) {
+                return v;
+            }
             return new Date(v);
         }
     }

http://lada.wald.intevation.org