Update gun.js

This commit is contained in:
Mark Nadal 2017-01-11 10:38:10 -08:00 committed by GitHub
parent bd0e6a615f
commit 8c426553d7

5
gun.js
View File

@ -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) {