Skip to content

Commit ce6135c

Browse files
committed
fix: channel config edge cases
1 parent dd4b191 commit ce6135c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ const ChannelWithContext = <
659659
const uploadAbortControllerRef = useRef<Map<string, AbortController>>(new Map());
660660

661661
const channelId = channel?.id || '';
662+
const pollCreationEnabled = !channel.disconnected && channel.id && channel?.getConfig()?.polls;
662663

663664
useEffect(() => {
664665
const initChannel = async () => {
@@ -2353,8 +2354,6 @@ const ChannelWithContext = <
23532354
setLoadingMoreRecent,
23542355
});
23552356

2356-
const pollCreationEnabled = channel.getConfig()?.polls;
2357-
23582357
const messagesContext = useCreateMessagesContext({
23592358
additionalTouchableProps,
23602359
Attachment,

0 commit comments

Comments
 (0)