Update widget/src/providers/BroadcastChannelProvider.tsx

This commit is contained in:
Med Marrouchi 2025-01-30 11:50:29 +01:00 committed by GitHub
parent a1b9bfcba0
commit c5f61d1d3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,7 +136,7 @@ export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
export const useBroadcastChannel = () => {
const context = useContext(BroadcastChannelContext);
if (context === undefined) {
if (!context) {
throw new Error(
"useBroadcastChannel must be used within a BroadcastChannelProvider",
);