From cc276a6862bcd2cd3748276aca0449b7dfd01cb5 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Sat, 27 Jul 2019 19:43:19 -0700 Subject: [PATCH] uuid fix (?) for @go1dfish --- gun.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gun.js b/gun.js index 95c2d0ea..e3c4ee20 100644 --- a/gun.js +++ b/gun.js @@ -802,6 +802,7 @@ Gun.on.get = function(msg, gun){ var root = gun._, get = msg.get, soul = get[_soul], node = root.graph[soul], has = get[_has], tmp; var next = root.next || (root.next = {}), at = next[soul]; + // queue concurrent GETs? if(!node){ return root.on('get', msg) } if(has){ if('string' != typeof has || !obj_has(node, has)){ return root.on('get', msg) } @@ -1483,7 +1484,6 @@ }, as); if(as.res){ as.res() } } function no(v,k){ if(v){ return true } } - //console.debug(999,1); var C = 0; setInterval(function(){ try{ debug.innerHTML = C }catch(e){console.log(e)} }, 500); function map(v,k,n, at){ var as = this; var is = Gun.is(v); @@ -1513,7 +1513,7 @@ id = at.dub = at.dub || id || Gun.node.soul(cat.obj) || Gun.node.soul(msg.put || at.put) || Gun.val.link.is(msg.put || at.put) || (as.via.back('opt.uuid') || Gun.text.random)(); // TODO: BUG!? Do we really want the soul of the object given to us? Could that be dangerous? if(eve){ eve.stun = true } if(!id){ // polyfill async uuid for SEA - at.via.back('opt.uuid')(function(err, id){ // TODO: improve perf without anonymous callback + as.via.back('opt.uuid')(function(err, id){ // TODO: improve perf without anonymous callback if(err){ return Gun.log(err) } // TODO: Handle error. solve(at, at.dub = at.dub || id, cat, as); }); diff --git a/package.json b/package.json index 89b5b399..68d1b740 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gun", - "version": "0.2019.712", + "version": "0.2019.726", "description": "A realtime, decentralized, offline-first, graph data synchronization engine.", "main": "index.js", "browser": "gun.js",