From 03f939ee1c81a6c7cd6ca82e395dda9c01229f33 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Sat, 10 Jul 2021 22:31:00 -0700 Subject: [PATCH] Update sea.js --- sea.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sea.js b/sea.js index 2880b89f..8f95c408 100644 --- a/sea.js +++ b/sea.js @@ -1040,10 +1040,12 @@ ;USE(function(module){ var User = USE('./user'), SEA = User.SEA, Gun = User.GUN, noop = function(){}; User.prototype.pair = function(){ - console.log("user.pair() IS DEPRECATED AND WILL BE DELETED!!!"); - var user = this; - if(!user.is){ return false } - return user._.sea; + var user = this, proxy; // undeprecated, hiding with proxies. + try{ proxy = new Proxy({}, {get: function(t,p,r){ + if(!user.is || !(user._||'').sea){ return } + return user._.sea[p]; + }})}catch(e){} + return proxy; } // If authenticated user wants to delete his/her account, let's support it! User.prototype.delete = async function(alias, pass, cb){