Skip to content

Commit

Permalink
Pass proper context
Browse files Browse the repository at this point in the history
In version 0.16 of knex, not passing the knex context results in `this.client.transaction` being undefined.
  • Loading branch information
jbrumwell committed Dec 13, 2018
1 parent ec58b8d commit e7ddf72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bookshelf.js
Expand Up @@ -232,7 +232,7 @@ function Bookshelf(knex) {
* Bookshelf~transactionCallback transactionCallback}.
*/
transaction() {
return this.knex.transaction.apply(this, arguments);
return this.knex.transaction.apply(this.knex, arguments);
},

/**
Expand Down

0 comments on commit e7ddf72

Please sign in to comment.