Skip to content

Commit 225efe7

Browse files
committed
revert gtm logic, delete unnecessary log
1 parent e2cca12 commit 225efe7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/features/common/components/shell/gtm/safe-gtm.component.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ export function SafeGTM({ gtmId}: { gtmId: string}) {
99
const [canLoad, setCanLoad] = useState(false)
1010

1111
useEffect(() => {
12-
/* const hash = window.location.hash
12+
/** GTM can make the app crash when large tokens are sent via hash
13+
* This code deletes temporaly the hash, loads the GTM and then puts it
14+
* back again
15+
*/
16+
const hash = window.location.hash
1317
const hasLargeHash = hash.length > MAX_HASH_LENGTH
1418
let originalHash = ""
1519
if(hasLargeHash) {
@@ -18,7 +22,7 @@ export function SafeGTM({ gtmId}: { gtmId: string}) {
1822
setTimeout(() => {
1923
window.location.hash = originalHash
2024
}, 500)
21-
} */
25+
}
2226
setCanLoad(true)
2327
}, [])
2428

src/features/decoder/components/token-decoder.component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const TokenDecoderComponent: React.FC<TokenDecoderComponentProps> = ({
5151

5252
useEffect(() => {
5353
const handleHashChange = () => {
54-
console.count("hash handler fired")
5554
const hash = window.location.hash.substring(1);
5655

5756
if (hash.includes("debugger-io?token=")) {

0 commit comments

Comments
 (0)