Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ed5784e + c5efc1e commit a1a9952Copy full SHA for a1a9952
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