From e80edd4a0b53e4c75441345e255e2ba055f43381 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 3 Oct 2019 16:23:27 +0200 Subject: [PATCH] Fix error message printed in the console for unregistered users --- www/common/outer/async-store.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 12083244e..6e9d1e619 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2082,20 +2082,20 @@ define([ loadUniversal(Team, 'team', waitFor); cleanFriendRequests(); }).nThen(function () { - arePinsSynced(function (err, yes) { - if (!yes) { - resetPins(function (err) { - if (err) { return console.error(err); } - console.log('RESET DONE'); - }); - } - }); - var requestLogin = function () { broadcast([], "REQUEST_LOGIN"); }; if (store.loggedIn) { + arePinsSynced(function (err, yes) { + if (!yes) { + resetPins(function (err) { + if (err) { return console.error(err); } + console.log('RESET DONE'); + }); + } + }); + /* This isn't truly secure, since anyone who can read the user's object can set their local loginToken to match that in the object. However, it exposes a UI that will work most of the time. */