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

Commit 8671427a by Guilherme Souza

Update lib/sequelize.js

Using defaults instead of checking manually the existence of options.type
1 parent e46a9b38
Showing with 2 additions and 2 deletions
......@@ -139,9 +139,9 @@ module.exports = (function() {
}
options = Utils._.extend(Utils._.clone(this.options.query), options)
options = Utils._.extend(options, {
options = Utils._.defaults(options, {
logging: this.options.hasOwnProperty('logging') ? this.options.logging : console.log,
type: options.type || (sql.toLowerCase().indexOf('select') === 0) ? 'SELECT' : false
type: (sql.toLowerCase().indexOf('select') === 0) ? 'SELECT' : false
})
return this.connectorManager.query(sql, callee, options)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!