add early return
This commit is contained in:
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 };
|
||||
Reference in new issue
Block a user