ensure that function signatures are correct

This commit is contained in:
ansuz
2017-08-28 11:40:31 +02:00
parent 91f6e3e543
commit c66a0c55e0
4 changed files with 16 additions and 15 deletions

View File

@@ -24,6 +24,10 @@ types of messages:
var hkn = network.historyKeeper;
var txid = uid();
if (typeof(cb) !== 'function') {
return console.error('expected callback');
}
var pending = ctx.pending[txid] = function (err, response) {
cb(err, response);
};