Follow-up

This commit is contained in:
Alexander Zinchuk 2021-06-23 18:13:09 +03:00
parent 322ae7077f
commit 0f0ebeafe0

View File

@ -152,8 +152,9 @@ function onUpdateConnectionState(update: ApiUpdateConnectionState) {
function onUpdateSession(update: ApiUpdateSession) {
const { sessionData } = update;
const { authRememberMe, authState } = getGlobal();
const isEmpty = !sessionData || !sessionData.mainDcId;
if (!authRememberMe || (sessionData && authState !== 'authorizationStateReady')) {
if (!authRememberMe || authState !== 'authorizationStateReady' || isEmpty) {
return;
}