webstaff: fix toTypedHash conversion of null dates
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 25 Apr 2017 21:27:22 +0000 (17:27 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 25 Apr 2017 21:27:22 +0000 (17:27 -0400)
... and avoid flashbacks to 1969/1970

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/services/idl.js

index a6936e6..a62b031 100644 (file)
@@ -213,7 +213,7 @@ angular.module('egCoreMod')
                                 hash[field] = obj[field]();
                                 break;
                             case 'timestamp':
-                                hash[field] = new Date(val);
+                                hash[field] = (val === null) ? val : new Date(val);
                                 break;
                             case 'bool':
                                 if (val == 't') {