git ssb

3+

Dominic / ssb-blobs



Commit 0c7a4a8666e22690eb45952c1f96f70936f261e6

oops, was never calling has callback, which broke images

Dominic Tarr committed on 4/10/2017, 9:49:38 PM
Parent: 796634e94c93bda5d25791822b9963855f108960

Files changed

inject.jschanged
inject.jsView
@@ -244,13 +244,16 @@
244244 }
245245 else if(!isBlobId(hash))
246246 return cb(new Error('invalid hash:'+hash))
247247
248- if(this === self || !this || this === global) { // a local call
249- return blobs.has.call(this, hash, cb)
248 + if(!legacy) {
249 + blobs.has.call(this, hash, cb)
250250 }
251 + else {
251252 //LEGACY LEGACY LEGACY
252- if(!legacy) return
253 + if(this === self || !this || this === global) { // a local call
254 + return blobs.has.call(this, hash, cb)
255 + }
253256 //ELSE, interpret remote calls to has as a WANT request.
254257 //handling this by calling process (which calls size())
255258 //avoids a race condition in the tests.
256259 //(and avoids doubling the number of calls)
@@ -261,11 +264,10 @@
261264 process(o, null, function (err, res) {
262265 var a = []; for(var k in o) a.push(res[k] > 0)
263266 cb(null, Array.isArray(hash) ? a : a[0])
264267 })
265-
266268 //LEGACY LEGACY LEGACY
267-
269 + }
268270 },
269271 size: blobs.size,
270272 get: blobs.get,
271273 add: blobs.add,
@@ -329,4 +331,7 @@
329331 }
330332 }
331333 }
332334
335 +
336 +
337 +

Built with git-ssb-web