From c7f05400e3273164bc562f6e13ba0bbe60f27c60 Mon Sep 17 00:00:00 2001 From: Reed <3893871+dharit-tan@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:23:46 -0400 Subject: [PATCH] Check if messagesStatus undefined in ChatScreen (#3113) --- .../packages/mobile/src/screens/chat-screen/ChatScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/audius-client/packages/mobile/src/screens/chat-screen/ChatScreen.tsx b/apps/audius-client/packages/mobile/src/screens/chat-screen/ChatScreen.tsx index ef7721921d4..622e1b73206 100644 --- a/apps/audius-client/packages/mobile/src/screens/chat-screen/ChatScreen.tsx +++ b/apps/audius-client/packages/mobile/src/screens/chat-screen/ChatScreen.tsx @@ -158,7 +158,7 @@ export const ChatScreen = () => { const chatFrozenRef = useRef(chat) useEffect(() => { - if (chatId && chat?.messagesStatus === Status.IDLE) { + if (chatId && (chat?.messagesStatus ?? Status.IDLE) === Status.IDLE) { // Initial fetch dispatch(fetchMoreMessages({ chatId })) }