Skip to content

Commit

Permalink
don't require a callback for store commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nateps committed Aug 11, 2012
1 parent 8910e3b commit a058599
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/txns/txns.Store.js
@@ -1,6 +1,7 @@
var Promise = require('../util/Promise') var Promise = require('../util/Promise')
, transaction = require('../transaction') , transaction = require('../transaction')
, createMiddleware = require('../middleware') , createMiddleware = require('../middleware')
, noop = require('../util').noop
; ;


module.exports = { module.exports = {
Expand Down Expand Up @@ -174,9 +175,9 @@ module.exports = {
req.startId = this._mode._startId; req.startId = this._mode._startId;
} }
var res = { var res = {
fail: callback fail: callback || noop
, send: function (txn) { , send: function (txn) {
callback(null, txn); callback && callback(null, txn);
} }
}; };
this.middleware.txn(req, res); this.middleware.txn(req, res);
Expand Down

0 comments on commit a058599

Please sign in to comment.