mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
bump set
This commit is contained in:
parent
39d0da0f6d
commit
029e11e907
8
gun.js
8
gun.js
@ -2217,8 +2217,11 @@
|
|||||||
var gun = this, soul;
|
var gun = this, soul;
|
||||||
cb = cb || function(){};
|
cb = cb || function(){};
|
||||||
if(soul = Gun.node.soul(item)){ return gun.set(gun.back(-1).get(soul), cb, opt) }
|
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) }
|
if(!Gun.is(item)){
|
||||||
return item.get('_').get(function(at, ev){
|
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);
|
if(!at.gun || !at.gun._.back);
|
||||||
ev.off();
|
ev.off();
|
||||||
at = (at.gun._.back._);
|
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 + '"!')}) }
|
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);
|
gun.put(Gun.obj.put(put, soul, Gun.val.rel.ify(soul)), cb, opt);
|
||||||
},{wait:0});
|
},{wait:0});
|
||||||
|
return item;
|
||||||
}
|
}
|
||||||
})(require, './set');
|
})(require, './set');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gun",
|
"name": "gun",
|
||||||
"version": "0.6.4",
|
"version": "0.6.5",
|
||||||
"description": "Graph engine",
|
"description": "Graph engine",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"browser": "gun.min.js",
|
"browser": "gun.min.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user