Fix exception when opening some chats (#1454)
This commit is contained in:
parent
12fc0eb12b
commit
5b027e878b
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user