changeset 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 87c1579f320d
children e3e4adb00f32
files app/lib/Helpers.js
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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