Skip to content

Commit

Permalink
fix(api): drop table overwrite options on promises
Browse files Browse the repository at this point in the history
If drop table was called as promise, it was not explicitly checked if options
is a function and was used and set as callback.

Also upgraded bluebird dependency.
  • Loading branch information
wzrdtales committed Jan 27, 2016
1 parent 7c4ecfb commit 602f5e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ module.exports = Base = Class.extend({

dropTable: function(tableName, options, callback) {

if (arguments.length < 3) {
if (arguments.length < 3 && typeof(options) === 'function') {
callback = options;
options = {};
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
},
"homepage": "https://github.com/db-migrate/db-migrate-base",
"dependencies": {
"bluebird": "^2.9.34"
"bluebird": "^3.1.1"
}
}

0 comments on commit 602f5e3

Please sign in to comment.