prevent original click event on links

This commit is contained in:
dank074 2021-11-21 22:58:41 -06:00
parent c5d6da6e97
commit 0fa6591b59

View File

@ -38,8 +38,8 @@ export const NitropediaView: FC<{}> = props =>
{ {
if(event.target instanceof HTMLAnchorElement) if(event.target instanceof HTMLAnchorElement)
{ {
event.preventDefault();
const link = event.target.href; const link = event.target.href;
console.log(link);
if(link.startsWith(internalLinkPrefix)) if(link.startsWith(internalLinkPrefix))
{ {