mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 20:34:44 +00:00
simplify
This commit is contained in:
@@ -83,12 +83,8 @@ function handle_click(event: MouseEvent) {
|
||||
const svg = typeof a.href === 'object' && a.href.constructor.name === 'SVGAnimatedString';
|
||||
const href = String(svg ? (<SVGAElement>a).href.baseVal : a.href);
|
||||
|
||||
if (location.hash && href === location.href) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (href === location.href) {
|
||||
event.preventDefault();
|
||||
if (!location.hash) event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user