Fix: Uptime UseChecks Hook
This commit is contained in:
1 parent
5958d4b81c
commit
c9e604efed
1 file changed
+3
-1
@@ -9,7 +9,9 @@ export const useChecksFetch = ({ monitorId, monitorType, dateRange, page, rowsPe
|
|||||||
const [networkError, setNetworkError] = useState(false);
|
const [networkError, setNetworkError] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!monitorType) return;
|
if (!monitorType) {
|
||||||
|
throw new Error('Monitor Type is not provided. Fetching checks will not proceed.');
|
||||||
|
}
|
||||||
|
|
||||||
const fetchChecks = async () => {
|
const fetchChecks = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user