mirror of
https://github.com/amark/gun.git
synced 2025-07-10 06:42:32 +00:00
Update gun.js
This commit is contained in:
parent
bd0e6a615f
commit
8c426553d7
5
gun.js
5
gun.js
@ -2448,7 +2448,7 @@
|
|||||||
|
|
||||||
function request (peers, ctx) {
|
function request (peers, ctx) {
|
||||||
if (Client.isSupported) {
|
if (Client.isSupported) {
|
||||||
Client.broadcast(peers, { body: ctx });
|
Client.broadcast(peers, ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2457,13 +2457,14 @@
|
|||||||
var gun = ctx.gun;
|
var gun = ctx.gun;
|
||||||
|
|
||||||
var peers = gun.Back('opt.peers') || {};
|
var peers = gun.Back('opt.peers') || {};
|
||||||
|
var headers = gun.Back('opt.headers') || {};
|
||||||
|
|
||||||
// Validate.
|
// Validate.
|
||||||
if (Gun.obj.empty(peers)) {
|
if (Gun.obj.empty(peers)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
request(peers, ctx);
|
request(peers, {body: ctx, headers: headers});
|
||||||
});
|
});
|
||||||
|
|
||||||
request.jsonp = function (opt, cb) {
|
request.jsonp = function (opt, cb) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user