Skip to content

Commit

Permalink
Incorporate @darknos expanded check for zero dates
Browse files Browse the repository at this point in the history
  • Loading branch information
bbito committed Apr 21, 2017
1 parent 4f88e38 commit e8fdbdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ MySQL.prototype.fromColumnValue = function(prop, val) {
// MySQL allows, unless NO_ZERO_DATE is set, dummy date/time entries
// new Date() will return Invalid Date for those, so we need to handle
// those separate.
if (val == '0000-00-00 00:00:00') {
if (!val || val == '0000-00-00 00:00:00' || val == '0000-00-00') {
val = null;
}
break;
Expand Down

0 comments on commit e8fdbdc

Please sign in to comment.