[Lada-commits] [PATCH] Fixed converting dates from timestamp to date object to allow empty(NULL) values
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 6 12:50:44 CEST 2013
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1378464799 -7200
# Node ID 60a2812568cb90860df8d075d8f296d2d44b9e29
# Parent 87c1579f320d38d111e56bc51f6479617c122b6c
Fixed converting dates from timestamp to date object to allow empty(NULL) values.
diff -r 87c1579f320d -r 60a2812568cb app/lib/Helpers.js
--- 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);
}
}
More information about the Lada-commits
mailing list