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

Commit c0bed722 by Matthew Ohlman

Fix bug when setting a date field with undefined value

1 parent 04b95b74
Showing with 1 additions and 1 deletions
...@@ -298,7 +298,7 @@ module.exports = (function() { ...@@ -298,7 +298,7 @@ module.exports = (function() {
} }
// Convert date fields to real date objects // Convert date fields to real date objects
if (this.Model._hasDateAttributes && this.Model._isDateAttribute(key) && value !== null && !(value instanceof Date) && !value._isSequelizeMethod) { if (this.Model._hasDateAttributes && this.Model._isDateAttribute(key) && value !== null && value !== undefined && !(value instanceof Date) && !value._isSequelizeMethod) {
value = new Date(value); value = new Date(value);
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!