Skip to content

Commit

Permalink
removing console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BermetK123 committed Jan 15, 2025
1 parent afbdf41 commit a4fc535
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions blocks/identity-block/utils/validate-redirect-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ const validateURL = (url) => {

try {
const urlObject = new URL(url, window.location.origin);
console.log("urlObject " + urlObject.origin)
console.log("window " +window.location.origin)

if (urlObject.origin === window.location.origin) {
console.log("urlObject pth " + urlObject.pathname);

if(urlObject.pathname === "/"){
return urlObject.pathname
Expand All @@ -17,9 +14,9 @@ const validateURL = (url) => {
return `${urlObject.origin}${urlObject.pathname}`
}
}

sessionStorage.setItem("ArcXP_redirectUrl", "/");
return "/";

} catch (error) {
const storedRedirect = sessionStorage.getItem("ArcXP_redirectUrl");
if (storedRedirect && storedRedirect.startsWith("/")) {
Expand Down

0 comments on commit a4fc535

Please sign in to comment.