braid-blob 0.0.38 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -464,13 +464,7 @@ function create_braid_blob() {
464
464
 
465
465
  try {
466
466
  // Check if remote has our current version (simple fork-point check)
467
- var local_result = await braid_blob.get(a, {
468
- signal: ac.signal,
469
- head: true,
470
- headers: options.headers,
471
- content_type: options.content_type,
472
- peer: options.peer,
473
- })
467
+ var local_result = await braid_blob.get(a, { head: true })
474
468
  var local_version = local_result ? local_result.version : null
475
469
  var server_has_our_version = false
476
470
 
@@ -546,8 +540,12 @@ function create_braid_blob() {
546
540
 
547
541
  // Set up both subscriptions, handling cases where one doesn't exist yet
548
542
  braid_blob.get(a, a_ops).then(x =>
549
- x || remote_first_put_promise.then(() =>
550
- braid_blob.get(a, a_ops)))
543
+ x || remote_first_put_promise.then(async () => {
544
+ // update parents, since we know remote has the version we just got from them..
545
+ var local_result = await braid_blob.get(a, { head: true })
546
+ a_ops.parents = local_result.version
547
+ braid_blob.get(a, a_ops)
548
+ }))
551
549
 
552
550
  var remote_res = await braid_blob.get(b, b_ops)
553
551
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-blob",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "description": "Library for collaborative blobs over http using braid.",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braid-blob",