mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 04:48:51 +00:00
Update widget/src/providers/BroadcastChannelProvider.tsx
This commit is contained in:
parent
a1b9bfcba0
commit
c5f61d1d3a
@ -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",
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user