Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (renderedInTheTopWindow || renderedInAModal) {
return;
}
const normalizedLocation = getNormalizedURL(location);
/*
We delete this param that ends up unnecassarily stuck on
the iframe due to oauth when propagating up.
*/
normalizedLocation.searchParams.delete('hmac');
const {pathname, search, hash} = normalizedLocation;
const locationStr = `${pathname}${search}${hash}`;
history.dispatch(History.Action.REPLACE, locationStr);
}, [history, location]);
}