This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,10 @@ export function ALEPH({ initial }: {
207207export async function redirect ( url : string , replace ?: boolean ) {
208208 const { location, history } = window as any
209209
210+ if ( ! util . isNEString ( url ) ) {
211+ return
212+ }
213+
210214 if ( util . isHttpUrl ( url ) ) {
211215 location . href = url
212216 return
Original file line number Diff line number Diff line change @@ -855,12 +855,13 @@ export class Project {
855855 ` const appLinks = [];` ,
856856 ` const onClick = e => {` ,
857857 ` e.preventDefault();` ,
858- ` redirect(e.target .getAttribute("href"));` ,
858+ ` redirect(e.currentTarget .getAttribute("href"));` ,
859859 ` };` ,
860860 ` if (ref.current) {` ,
861861 ` ref.current.querySelectorAll("a").forEach(a => {` ,
862- ` if (!/^(https?|mailto|file):/i.test(a.getAttribute("href"))) {` ,
863- ` a.addEventListener("click", onClick);` ,
862+ ` const href = a.getAttribute("href")` ,
863+ ` if (href && !/^(https?|mailto|file):/i.test(href)) {` ,
864+ ` a.addEventListener("click", onClick, false);` ,
864865 ` appLinks.push(a);` ,
865866 ` }` ,
866867 ` });` ,
You can’t perform that action at this time.
0 commit comments