diff --git a/src/hooks/useChannel.ts b/src/hooks/useChannel.ts index 92e7e09..eabac42 100644 --- a/src/hooks/useChannel.ts +++ b/src/hooks/useChannel.ts @@ -22,6 +22,9 @@ export function useChannel(channelName: string, ...channelSubscriptionArguments: } const useEffectHook = () => { + if(!channel) { + return + } onMount(); return () => { onUnmount(); }; };