We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c32085c commit ac973a4Copy full SHA for ac973a4
site/src/contexts/useProxyLatency.ts
@@ -98,7 +98,11 @@ export const useProxyLatency = (
98
// This prevents fetching latencies too often.
99
// 1. Fetch the latest stored latency for the given proxy.
100
// 2. If the latest latency is after the latestFetchRequest, then skip the latency check.
101
- if (storedLatencies && storedLatencies[proxy.id]) {
+ if (
102
+ storedLatencies &&
103
+ storedLatencies[proxy.id] &&
104
+ storedLatencies[proxy.id].length > 0
105
+ ) {
106
const fetchRequestDate = new Date(latestFetchRequest)
107
const latest = storedLatencies[proxy.id].reduce((prev, next) =>
108
prev.at > next.at ? prev : next,
0 commit comments