Skip to content

Commit e8fdbdc

Browse files
committed
Incorporate @darknos expanded check for zero dates
1 parent 4f88e38 commit e8fdbdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mysql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ MySQL.prototype.fromColumnValue = function(prop, val) {
437437
// MySQL allows, unless NO_ZERO_DATE is set, dummy date/time entries
438438
// new Date() will return Invalid Date for those, so we need to handle
439439
// those separate.
440-
if (val == '0000-00-00 00:00:00') {
440+
if (!val || val == '0000-00-00 00:00:00' || val == '0000-00-00') {
441441
val = null;
442442
}
443443
break;

0 commit comments

Comments
 (0)