diff --git a/widget/src/providers/BroadcastChannelProvider.tsx b/widget/src/providers/BroadcastChannelProvider.tsx index 7f8cb529..73933e54 100644 --- a/widget/src/providers/BroadcastChannelProvider.tsx +++ b/widget/src/providers/BroadcastChannelProvider.tsx @@ -136,7 +136,7 @@ export const BroadcastChannelProvider: FC = ({ export const useBroadcastChannel = () => { const context = useContext(BroadcastChannelContext); - if (context === undefined) { + if (!context) { throw new Error( "useBroadcastChannel must be used within a BroadcastChannelProvider", );