test: fix use node health hook

This commit is contained in:
Matthew Russell
2023-11-11 13:58:50 -08:00
parent a196c96156
commit a90f631a3e
@@ -22,7 +22,7 @@ export const useNodeHealth = () => {
});
const blockDiff = useMemo(() => {
if (!data?.statistics.blockHeight) {
if (!data?.statistics?.blockHeight) {
return null;
}
@@ -31,7 +31,7 @@ export const useNodeHealth = () => {
}
return Number(data.statistics.blockHeight) - headers.blockHeight;
}, [data?.statistics.blockHeight, headers?.blockHeight]);
}, [data?.statistics?.blockHeight, headers?.blockHeight]);
useEffect(() => {
if (error) {