fix: use the href of the url object instead of the object iself as the

dep in the callback
This commit is contained in:
Stavros
2026-02-15 19:55:37 +02:00
parent d7b00ffeea
commit ff771c5c22
2 changed files with 8 additions and 3 deletions

3
.gitignore vendored
View File

@@ -39,3 +39,6 @@ __debug_*
# infisical # infisical
/.infisical.json /.infisical.json
# traefik data
/traefik

View File

@@ -32,6 +32,8 @@ export const ContinuePage = () => {
cookieDomain, cookieDomain,
); );
const urlHref = url?.href;
const hasValidRedirect = valid && allowedProto; const hasValidRedirect = valid && allowedProto;
const showUntrustedWarning = const showUntrustedWarning =
hasValidRedirect && !trusted && !disableUiWarnings; hasValidRedirect && !trusted && !disableUiWarnings;
@@ -44,13 +46,13 @@ export const ContinuePage = () => {
!showInsecureWarning; !showInsecureWarning;
const redirectToTarget = useCallback(() => { const redirectToTarget = useCallback(() => {
if (!url || hasRedirected.current) { if (!urlHref || hasRedirected.current) {
return; return;
} }
hasRedirected.current = true; hasRedirected.current = true;
window.location.assign(url); window.location.assign(urlHref);
}, [url]); }, [urlHref]);
const handleRedirect = useCallback(() => { const handleRedirect = useCallback(() => {
setIsLoading(true); setIsLoading(true);