diff --git a/gun.js b/gun.js index c5bd78a0..5dcac8b2 100644 --- a/gun.js +++ b/gun.js @@ -922,7 +922,7 @@ if(n instanceof Function){ var yes, tmp = {back: at}; while((tmp = tmp.back) - && !(yes = n(tmp, opt))){} + && u === (yes = n(tmp, opt))){} return yes; } if(Gun.num.is(n)){ diff --git a/sea.js b/sea.js index d6bff3ad..e1e6282f 100644 --- a/sea.js +++ b/sea.js @@ -35,7 +35,7 @@ if(location.protocol.indexOf('s') < 0 && location.host.indexOf('localhost') < 0 && location.protocol.indexOf('file:') < 0){ - location.protocol = 'https:'; + location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS! } } })(USE, './https'); @@ -1091,6 +1091,7 @@ } return user; } + Gun.User = User; module.exports = User; })(USE, './user');