diff --git a/src/modules/actions/api/users.ts b/src/modules/actions/api/users.ts index d535168d2..95165832b 100644 --- a/src/modules/actions/api/users.ts +++ b/src/modules/actions/api/users.ts @@ -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) {