Skip to content

Commit

Permalink
[lib] fix reading messageIDs of undefined
Browse files Browse the repository at this point in the history
Summary: Fix for D13162.

Test Plan: Being able to create a thread/sidebar.

Reviewers: tomek, inka

Reviewed By: inka

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13183
  • Loading branch information
xsanm committed Aug 28, 2024
1 parent d3d04d0 commit 4859f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shared/message-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ function useFetchMessages(threadInfo: ThreadInfo): () => Promise<void> {

const threadID = threadInfo.id;
const messageIDs = useSelector(
state => state.messageStore.threads[threadID].messageIDs,
state => state.messageStore.threads[threadID]?.messageIDs,
);

return React.useCallback(async () => {
Expand Down

0 comments on commit 4859f1e

Please sign in to comment.