mirror of
https://github.com/amark/gun.git
synced 2026-03-08 01:51:43 +00:00
uuid fix (?) for @go1dfish
This commit is contained in:
4
gun.js
4
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);
|
||||
});
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user