Fix exception when opening some chats (#1454)

This commit is contained in:
Alexander Zinchuk 2021-09-17 17:17:32 +03:00
parent 12fc0eb12b
commit 5b027e878b

View File

@ -185,6 +185,10 @@ addReducer('loadProfilePhotos', (global, actions, payload) => {
const user = isPrivate ? selectUser(global, profileId) : undefined;
const chat = !isPrivate ? selectChat(global, profileId) : undefined;
if (!user && !chat) {
return;
}
(async () => {
const result = await callApi('fetchProfilePhotos', user, chat);
if (!result || !result.photos) {