Merge pull request #110 from PsychoLlama/master

Check Gun.path for null value before calling a method on it, fix #108
This commit is contained in:
MetaSean 2015-10-21 12:57:55 -06:00
commit 45fcada245

2
gun.js
View File

@ -481,7 +481,7 @@
var gun = this.chain();
cb = cb || function(){};
opt = opt || {};
if((path !== null && !path) || !Gun.text.is(path = path.join? path.join('.') : path + '')){ return }
if((path !== null && !path) || path === null || !Gun.text.is(path = path.join? path.join('.') : path + '')){ return }
if(!gun.back._.at){ return cb.call(gun, {err: Gun.log("No context!")}), gun }
gun.back.on(function($, node){