mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
Merge pull request #936 from joedakroub/master
Fix for ES Modules when using a peer
This commit is contained in:
commit
ff99a4639d
2
gun.js
2
gun.js
@ -2158,7 +2158,7 @@
|
|||||||
var message, loop;
|
var message, loop;
|
||||||
function each(peer){ mesh.say(message, peer) }
|
function each(peer){ mesh.say(message, peer) }
|
||||||
var say = mesh.say = function(msg, peer){
|
var say = mesh.say = function(msg, peer){
|
||||||
if(this.to){ this.to.next(msg) } // compatible with middleware adapters.
|
if(this && this.to){ this.to.next(msg) } // compatible with middleware adapters.
|
||||||
if(!msg){ return false }
|
if(!msg){ return false }
|
||||||
var id, hash, tmp, raw;
|
var id, hash, tmp, raw;
|
||||||
var DBG = msg.DBG, S; if(!peer){ S = +new Date ; DBG && (DBG.y = S) }
|
var DBG = msg.DBG, S; if(!peer){ S = +new Date ; DBG && (DBG.y = S) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user