Skip to content

Commit 34b40da

Browse files
fix: add userSavedProxy to auto-selection useEffect dependencies
The auto-selection useEffect needs to re-run when userSavedProxy changes to properly detect when the user has no saved proxy and auto-selection should occur. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
1 parent b63624f commit 34b40da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/src/contexts/ProxyContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const ProxyProvider: FC<PropsWithChildren> = ({ children }) => {
211211
saveUserSelectedProxy(best.proxy);
212212
updateProxy();
213213
}
214-
}, [latenciesLoaded, proxiesResp, proxyLatencies]);
214+
}, [latenciesLoaded, proxiesResp, proxyLatencies, userSavedProxy]);
215215

216216
return (
217217
<ProxyContext.Provider

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy