From 3e4ee751373f573702684f815b506f73f836edde Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 14 Jun 2019 10:03:52 +0200 Subject: [PATCH] Fix race condition with pins --- 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 19b4a4fe4..cfa071ec1 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -327,15 +327,6 @@ define([ account.note = obj.note; cb(obj); }); - - arePinsSynced(function (err, yes) { - if (!yes) { - resetPins(function (err) { - if (err) { return console.error(err); } - console.log('RESET DONE'); - }); - } - }); }); }); }; @@ -1666,6 +1657,15 @@ define([ loadUniversal(Profile, 'profile', 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"); };