diff --git a/examples/move/index.html b/examples/move/index.html
index fe3629f6..c613daf6 100644
--- a/examples/move/index.html
+++ b/examples/move/index.html
@@ -16,7 +16,7 @@
- Share
+ Request Ride
Copy and Paste this URL to your friends to share your location:
diff --git a/gun.js b/gun.js
index a9cb3734..3c10479d 100644
--- a/gun.js
+++ b/gun.js
@@ -400,7 +400,7 @@
return n;
}
State.to = function(from, k, to){
- var val = from[k]; // BUGGY!
+ var val = (from||{})[k];
if(obj_is(val)){
val = obj_copy(val);
}
@@ -1287,13 +1287,16 @@
return at;
}
function soul(gun, cb, opt, as){
- var cat = gun._, tmp;
+ var cat = gun._, acks = 0, tmp;
if(tmp = cat.soul){ return cb(tmp, as, cat), gun }
if(tmp = cat.link){ return cb(tmp, as, cat), gun }
- gun.get(function(msg, ev){ // TODO: Bug! Needs once semantics?
+ gun.get(function(msg, ev){
+ if(u === msg.put && (tmp = (obj_map(cat.root.opt.peers, function(v,k,t){t(k)})||[]).length) && acks++ <= tmp){
+ return;
+ }
ev.rid(msg);
var at = ((at = msg.$) && at._) || {};
- tmp = at.link || at.soul || rel.is(msg.put) || node_soul(msg.put);
+ tmp = at.link || at.soul || rel.is(msg.put) || node_soul(msg.put) || at.dub;
cb(tmp, as, msg, ev);
}, {out: {get: {'.':true}}});
return gun;
@@ -1344,7 +1347,7 @@
//obj.del(map, at); // TODO: Warning: This unsubscribes ALL of this chain's listeners from this link, not just the one callback event.
return;
}
- var obj = Gun.obj, obj_has = obj.has, obj_to = Gun.obj.to;
+ var obj = Gun.obj, obj_map = obj.map, obj_has = obj.has, obj_to = Gun.obj.to;
var num_is = Gun.num.is;
var rel = Gun.val.link, node_soul = Gun.node.soul, node_ = Gun.node._;
var empty = {}, u;
diff --git a/package.json b/package.json
index 4d042e3e..badddce1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gun",
- "version": "0.9.999993",
+ "version": "0.9.999994",
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
"main": "index.js",
"browser": "gun.min.js",
diff --git a/test/common.js b/test/common.js
index 5b61d1e8..30b97063 100644
--- a/test/common.js
+++ b/test/common.js
@@ -3705,6 +3705,7 @@ describe('Gun', function(){
});
it('Multiple subscribes should trigger', function(done){
+ // thanks to @ivkan for reporting and providing test.
var gun = Gun();
var check = {};
gun.get('m/s/key').put({property: 'value'});