mirror of
https://github.com/amark/gun.git
synced 2025-06-10 16:16:49 +00:00
Merge branch '0.5' of https://github.com/amark/gun into 0.5
This commit is contained in:
commit
aaf34a3dfe
3
gun.js
3
gun.js
@ -2186,11 +2186,12 @@
|
||||
'$': at.get // msg BODY
|
||||
};
|
||||
Tab.on(msg['#'], function(err, data){ // TODO: ONE? PERF! Clear out listeners, maybe with setTimeout?
|
||||
at.gun.Back(-1).on('in', {'@': at['#'], err: err, put: data});
|
||||
at.gun.Back(-1).on('out', {'@': at['#'], err: err, put: data});
|
||||
});
|
||||
Tab.peers(peers).send(msg, {headers: {'gun-sid': Tab.server.sid}});
|
||||
});
|
||||
Gun.on('put', function(at){
|
||||
if(at['@']){ return }
|
||||
var opt = at.gun.Back('opt') || {}, peers = opt.peers;
|
||||
if(!peers || Gun.obj.empty(peers)){
|
||||
Gun.log.once('peers', "Warning! You have no peers to save to!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user