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

You need to sign in or sign up before continuing.
Commit e0a41d2a by Jan Aagaard Meier

Change to hasOwnProperty

1 parent 26e5fe41
...@@ -155,7 +155,7 @@ module.exports = (function() { ...@@ -155,7 +155,7 @@ module.exports = (function() {
options.attributes = optAttributes.join(', ') options.attributes = optAttributes.join(', ')
} }
if (options.where !== undefined) { if (options.hasOwnProperty('where')) {
options.where = this.getWhereConditions(options.where, tableName) options.where = this.getWhereConditions(options.where, tableName)
query += " WHERE <%= where %>" query += " WHERE <%= where %>"
} }
......
...@@ -224,7 +224,7 @@ module.exports = (function() { ...@@ -224,7 +224,7 @@ module.exports = (function() {
options.attributes = optAttributes.join(', ') options.attributes = optAttributes.join(', ')
} }
if(options.where != undefined) { if(options.hasOwnProperty('where')) {
options.where = QueryGenerator.getWhereConditions(options.where) options.where = QueryGenerator.getWhereConditions(options.where)
query += " WHERE <%= where %>" query += " WHERE <%= where %>"
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!