diff --git a/gun.js b/gun.js index ae56ec0b..fa26b88b 100644 --- a/gun.js +++ b/gun.js @@ -538,13 +538,15 @@ var gun = this, root = (gun.__ && gun.__.gun)? gun.__.gun : (gun._ = gun.__ = {gun: gun}).gun.chain(); // if root does not exist, then create a root chain. root.__.by = root.__.by || function(f){ return gun.__.by[f] = gun.__.by[f] || {} }; root.__.graph = root.__.graph || {}; - root.__.opt = root.__.opt || {}; + root.__.opt = root.__.opt || {peers: {}}; root.__.opt.wire = root.__.opt.wire || {}; if(Gun.text.is(opt)){ opt = {peers: opt} } if(Gun.list.is(opt)){ opt = {peers: opt} } if(Gun.text.is(opt.peers)){ opt.peers = [opt.peers] } if(Gun.list.is(opt.peers)){ opt.peers = Gun.obj.map(opt.peers, function(n,f,m){ m(n,{}) }) } - root.__.opt.peers = opt.peers || gun.__.opt.peers || {}; + Gun.obj.map(opt.peers, function(v, f){ + root.__.opt.peers[f] = v; + }); Gun.obj.map(opt.wire, function(h, f){ if(!Gun.fns.is(h)){ return } root.__.opt.wire[f] = h; diff --git a/package.json b/package.json index 2914a305..5f8e0769 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gun", - "version": "0.3.94", + "version": "0.3.95", "description": "Graph engine", "main": "index.js", "scripts": {