From d51092da64871c7de011e4996ccc2b40b2bca439 Mon Sep 17 00:00:00 2001 From: Anders Rune Jensen Date: Sat, 24 Oct 2020 21:50:36 +0200 Subject: [PATCH] Don't die on empty feed in partial replication --- ssb-partial-replication.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssb-partial-replication.js b/ssb-partial-replication.js index df83470..202a09a 100644 --- a/ssb-partial-replication.js +++ b/ssb-partial-replication.js @@ -27,7 +27,10 @@ exports.init = function (sbot, config) { return pull( pullCont(function(cb) { SSB.db.getLatest(opts.id, (err, latest) => { - if (err) throw err + if (err) { + console.error("Got error on feed reverse", err) + return cb(null, pull.empty()) + } var seqStart = latest ? latest.sequence - (opts.limit - 1) : 0 if (seqStart < 0)