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 }: {
207
207
export async function redirect ( url : string , replace ?: boolean ) {
208
208
const { location, history } = window as any
209
209
210
+ if ( ! util . isNEString ( url ) ) {
211
+ return
212
+ }
213
+
210
214
if ( util . isHttpUrl ( url ) ) {
211
215
location . href = url
212
216
return
Original file line number Diff line number Diff line change @@ -855,12 +855,13 @@ export class Project {
855
855
` const appLinks = [];` ,
856
856
` const onClick = e => {` ,
857
857
` e.preventDefault();` ,
858
- ` redirect(e.target .getAttribute("href"));` ,
858
+ ` redirect(e.currentTarget .getAttribute("href"));` ,
859
859
` };` ,
860
860
` if (ref.current) {` ,
861
861
` 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);` ,
864
865
` appLinks.push(a);` ,
865
866
` }` ,
866
867
` });` ,
You can’t perform that action at this time.
0 commit comments