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.json
# traefik data
/traefik

View File

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