Commit 85ea06e8f97eb056f25b85d39a8d9383454ef98f
better error
Dominic Tarr committed on 2/2/2017, 10:16:31 AMParent: 3a87ab0f145263cab848f87d3125febdc5561b9a
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -157,9 +157,9 @@ | ||
157 | 157 … | //used by sbot replication plugin |
158 | 158 … | db.latestSequence = function (id, cb) { |
159 | 159 … | db.last.get(function (err, val) { |
160 | 160 … | if(err) cb(err) |
161 | - else if(!val[id]) cb(new Error('not found:'+id)) | |
161 … | + else if (!val || !val[id]) cb(new Error('not found:'+id)) | |
162 | 162 … | else cb(null, val[id].sequence) |
163 | 163 … | }) |
164 | 164 … | } |
165 | 165 … |
Built with git-ssb-web