vike-lite-react 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,6 +38,7 @@ function RouterApp(props) {
|
|
|
38
38
|
const matchedRoute = useMemo(() => matchRoute(currentPathname, props.routes), [currentPathname, props.routes]);
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
const handleLinkClick = (e) => {
|
|
41
|
+
if (!(e.target instanceof Element)) return;
|
|
41
42
|
const target = e.target.closest("a");
|
|
42
43
|
if (!target?.href || target.target === "_blank" || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) return;
|
|
43
44
|
const url = new URL(target.href);
|
|
@@ -65,6 +66,7 @@ function RouterApp(props) {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
const handleLinkPrefetch = (e) => {
|
|
69
|
+
if (!(e.target instanceof Element)) return;
|
|
68
70
|
const target = e.target.closest("a");
|
|
69
71
|
if (!target?.href) return;
|
|
70
72
|
if (target.target && target.target !== "_self") return;
|