From 9291434ed71b08f1871672bbee599d965834b766 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Fri, 15 Jun 2018 23:53:42 -0700 Subject: [PATCH] better back --- gun.js | 2 +- sea.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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');