From c5f61d1d3ad3ba2d5f635cf3c41dddc72b9a0e1d Mon Sep 17 00:00:00 2001 From: Med Marrouchi Date: Thu, 30 Jan 2025 11:50:29 +0100 Subject: [PATCH] Update widget/src/providers/BroadcastChannelProvider.tsx --- widget/src/providers/BroadcastChannelProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", );