Skip to content

Commit 1652942

Browse files
committed
refactor: useMqtt hook check falsy contexto
1 parent 339b306 commit 1652942

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useMqtt.hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ERROR_MESSAGES } from '../utils';
88
export const useMqtt = (): IMqttContext => {
99
const context = useContext(MqttContext);
1010

11-
invariant(context, ERROR_MESSAGES.NO_WRAPPER);
11+
invariant(!!context, ERROR_MESSAGES.NO_WRAPPER);
1212

1313
return context as IMqttContext;
1414
};

0 commit comments

Comments
 (0)