avoid sending nothing.

This commit is contained in:
d3x0r 2017-03-23 11:15:40 -07:00 committed by GitHub
parent 98b9c4fdb7
commit 7bad1dbecc

6
gun.js
View File

@ -2338,8 +2338,10 @@
if(!cat.udrain){ return }
var tmp = cat.udrain;
cat.udrain = null;
message = JSON.stringify(tmp);
Gun.obj.map(cat.opt.peers, send, cat);
if( tmp.length ) {
message = JSON.stringify(tmp);
Gun.obj.map(cat.opt.peers, send, cat);
}
},1);
wsp.count = 0;
Gun.obj.map(cat.opt.peers, send, cat);