This commit is contained in:
Mark Nadal 2017-03-13 17:37:39 -07:00
parent 39d0da0f6d
commit 029e11e907
2 changed files with 7 additions and 3 deletions

8
gun.js
View File

@ -2217,8 +2217,11 @@
var gun = this, soul;
cb = cb || function(){};
if(soul = Gun.node.soul(item)){ return gun.set(gun.back(-1).get(soul), cb, opt) }
if(Gun.obj.is(item) && !Gun.is(item)){ return gun.set(gun._.root.put(item), cb, opt) }
return item.get('_').get(function(at, ev){
if(!Gun.is(item)){
if(Gun.obj.is(item)){ return gun.set(gun._.root.put(item), cb, opt) }
return gun.get(Gun.text.random()).put(item);
}
item.get('_').get(function(at, ev){
if(!at.gun || !at.gun._.back);
ev.off();
at = (at.gun._.back._);
@ -2226,6 +2229,7 @@
if(!soul){ return cb.call(gun, {err: Gun.log('Only a node can be linked! Not "' + node + '"!')}) }
gun.put(Gun.obj.put(put, soul, Gun.val.rel.ify(soul)), cb, opt);
},{wait:0});
return item;
}
})(require, './set');

View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.6.4",
"version": "0.6.5",
"description": "Graph engine",
"main": "index.js",
"browser": "gun.min.js",