Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

don't require a callback for store commit

  • Loading branch information...
commit a05859987278818d1c4528bcbbbb2db5c51b3475 1 parent 8910e3b
@nateps nateps authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/txns/txns.Store.js
View
5 src/txns/txns.Store.js
@@ -1,6 +1,7 @@
var Promise = require('../util/Promise')
, transaction = require('../transaction')
, createMiddleware = require('../middleware')
+ , noop = require('../util').noop
;
module.exports = {
@@ -174,9 +175,9 @@ module.exports = {
req.startId = this._mode._startId;
}
var res = {
- fail: callback
+ fail: callback || noop
, send: function (txn) {
- callback(null, txn);
+ callback && callback(null, txn);
}
};
this.middleware.txn(req, res);
Please sign in to comment.
Something went wrong with that request. Please try again.