Fix error message printed in the console for unregistered users

This commit is contained in:
yflory 2019-10-03 16:23:27 +02:00
parent 8c61e3b9c4
commit e80edd4a0b

View File

@ -2082,20 +2082,20 @@ define([
loadUniversal(Team, 'team', waitFor); loadUniversal(Team, 'team', waitFor);
cleanFriendRequests(); cleanFriendRequests();
}).nThen(function () { }).nThen(function () {
arePinsSynced(function (err, yes) {
if (!yes) {
resetPins(function (err) {
if (err) { return console.error(err); }
console.log('RESET DONE');
});
}
});
var requestLogin = function () { var requestLogin = function () {
broadcast([], "REQUEST_LOGIN"); broadcast([], "REQUEST_LOGIN");
}; };
if (store.loggedIn) { 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 /* 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 set their local loginToken to match that in the object. However, it exposes
a UI that will work most of the time. */ a UI that will work most of the time. */