不要怂,就是干,撸起袖子干!

Commit 3791a296 by Michael Weibel

When value is null, don't try to convert to Date, instead just leave it

1 parent 8ccd34b4
Showing with 4 additions and 1 deletions
......@@ -91,7 +91,10 @@ module.exports = (function() {
results = results.map(function(result) {
for (var name in result) {
if (result.hasOwnProperty(name) && (metaData.columnTypes[name] === 'DATETIME')) {
result[name] = new Date(result[name]+'Z'); // Z means UTC
var val = result[name];
if(val !== null) {
result[name] = new Date(val+'Z'); // Z means UTC
}
}
}
return result
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!