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

Commit 209f3f45 by Chris Dibbern

avoid cryptic errors by checking for transaction

Without checking for this.transaction, a simple "access denied" error turns into the cryptic "cannot call commit on undefined" error.
1 parent f66dc707
Showing with 1 additions and 1 deletions
......@@ -1162,7 +1162,7 @@ module.exports = (function() {
});
});
}).finally(function () {
if (internalTransaction) {
if (internalTransaction && this.transaction) {
// If we created a transaction internally, we should clean it up
return this.transaction.commit();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!