[Tests] Fix warning for test session

This commit is contained in:
Alexander Zinchuk 2021-11-12 18:45:57 +03:00
parent e9b02557f4
commit 16b56735d1

View File

@ -32,9 +32,12 @@ export function storeSession(sessionData: ApiSessionData, currentUserId?: string
Object.keys(keys).map(Number).forEach((dcId) => {
localStorage.setItem(`dc${dcId}_auth_key`, JSON.stringify(keys[dcId]));
});
Object.keys(hashes).map(Number).forEach((dcId) => {
localStorage.setItem(`dc${dcId}_hash`, JSON.stringify(hashes[dcId]));
});
if (hashes) {
Object.keys(hashes).map(Number).forEach((dcId) => {
localStorage.setItem(`dc${dcId}_hash`, JSON.stringify(hashes[dcId]));
});
}
}
export function clearStoredSession() {