We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce56fb9 commit bb2ff87Copy full SHA for bb2ff87
src/index.js
@@ -52,10 +52,7 @@ export function genericHashLink(As) {
52
reset();
53
if (props.onClick) props.onClick(e);
54
if (typeof props.to === 'string') {
55
- hashFragment = props.to
56
- .split('#')
57
- .slice(1)
58
- .join('#');
+ hashFragment = props.to.split('#').slice(1).join('#');
59
} else if (
60
typeof props.to === 'object' &&
61
typeof props.to.hash === 'string'
@@ -65,9 +62,9 @@ export function genericHashLink(As) {
65
62
if (hashFragment !== '') {
66
63
scrollFunction =
67
64
props.scroll ||
68
- (el =>
+ ((el) =>
69
props.smooth
70
- ? el.scrollIntoView({ behavior: "smooth" })
+ ? el.scrollIntoView({ behavior: 'smooth' })
71
: el.scrollIntoView());
72
hashLinkScroll(props.timeout);
73
}
0 commit comments