Skip to content

Commit 5c202b2

Browse files
committed
Remove now-unnecessary about:blank debug reports
1 parent 1594fc0 commit 5c202b2

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/index.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -145,31 +145,4 @@ Promise.race([
145145
reportError('Successfully initialized application, but after timeout');
146146
});
147147
});
148-
});
149-
150-
// We have some weird errors appearing due to about:blank windows being spawned. There must be some bad links
151-
// somewhere, this temporary logging attempts to hunt them down:
152-
document.addEventListener('click', (e) => {
153-
try {
154-
const target = (e.target || e.srcElement) as Element;
155-
if (target && target.tagName === 'A') {
156-
const href = target.getAttribute('href');
157-
if (!href || href === 'about:blank') {
158-
reportError('Clicked blank link, path:', { path: getNodePath(target).join(' > '), page: window.location.pathname });
159-
}
160-
}
161-
} catch (err) {
162-
reportError('Error logging broken click links', err);
163-
}
164-
});
165-
166-
function getNodePath(el: Element) {
167-
const stack: string[] = [];
168-
169-
while (el.parentNode !== null) {
170-
stack.unshift(`${el.nodeName}(${el.className})`);
171-
el = el.parentNode as Element;
172-
}
173-
174-
return stack;
175-
}
148+
});

0 commit comments

Comments
 (0)