Do not blow up if the error is that a chain cannot be found
This commit is contained in:
parent
a7da21ccba
commit
943a291903
@ -3,8 +3,8 @@ var nThen = require('nthen');
|
|||||||
|
|
||||||
var getIndex = function(db, cName, cb) {
|
var getIndex = function(db, cName, cb) {
|
||||||
db.get(cName+'=>index', function(e, out){
|
db.get(cName+'=>index', function(e, out){
|
||||||
if (e) { throw e; }
|
if (e && !e.notFound) { throw e; }
|
||||||
cb(parseInt(out));
|
cb(parseInt(out || 0));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user