We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 339b306 commit 1652942Copy full SHA for 1652942
src/hooks/useMqtt.hook.ts
@@ -8,7 +8,7 @@ import { ERROR_MESSAGES } from '../utils';
8
export const useMqtt = (): IMqttContext => {
9
const context = useContext(MqttContext);
10
11
- invariant(context, ERROR_MESSAGES.NO_WRAPPER);
+ invariant(!!context, ERROR_MESSAGES.NO_WRAPPER);
12
13
return context as IMqttContext;
14
};
0 commit comments