Use NULL for undefined
This commit is contained in:
parent
177207d6a5
commit
8f5b09ba64
|
@ -269,7 +269,7 @@ function dateToMysql(val) {
|
|||
*/
|
||||
MySQL.prototype.toDatabase = function (prop, val) {
|
||||
if (val === null) return 'NULL';
|
||||
if (val === undefined) return;
|
||||
if (val === undefined) return 'NULL';
|
||||
if (val.constructor.name === 'Object') {
|
||||
var operator = Object.keys(val)[0]
|
||||
val = val[operator];
|
||||
|
|
Loading…
Reference in New Issue