add early return

This commit is contained in:
Alex Holliday committed 2025-02-07 14:48:14 -08:00
1 parent dec12cc6ab
commit d8c0839391
1 file changed
+4 -1
@@ -59,6 +59,9 @@ const useSubscribeToDetails = ({ monitorId, dateRange }) => {
useEffect(() => {
try {
if (typeof monitorId === "undefined") {
return;
}
const cleanup = networkService.subscribeToDistributedUptimeDetails({
authToken,
monitorId,
@@ -116,4 +119,4 @@ const useSubscribeToDetails = ({ monitorId, dateRange }) => {
return [isLoading, networkError, connectionStatus, monitor, lastUpdateTrigger];
};
export default useSubscribeToDetails;
export { useSubscribeToDetails };