Commit 06f263c1100b77af62177e4b11348b6b4574caae
fix async
cel committed on 2/5/2019, 8:55:46 AMParent: 0746ae0dd03e573e8cccf7ec2ed1cf97d6f7a044
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -29,9 +29,9 @@ | |||
29 | 29 … | return cb(null, module) | |
30 | 30 … | } catch(e) { | |
31 | 31 … | if (!tried && e && (e.code === 'ENOENT' || e.code === 'MODULE_NOT_FOUND')) { | |
32 | 32 … | var m = /(sha256)\/([0-9a-f]{2})\/([0-9a-f]{62})/.exec(e.path || e.message) | |
33 | - if (!m) throw e | ||
33 … | + if (!m) return cb(e) | ||
34 | 34 … | var blobId = '&' + new Buffer(m[2] + m[3], 'hex').toString('base64') + '.' + m[1] | |
35 | 35 … | if (!sbot.blobs) return cb(new Error('Missing ssb-blobs plugin')) | |
36 | 36 … | if (typeof sbot.blobs.want !== 'function') return cb(new Error('missing blobs.want method')) | |
37 | 37 … | return sbot.blobs.want(blobId, function (err, has) { |
Built with git-ssb-web