Skip to content

Commit ff6fe1a

Browse files
committed
Fix scrolling on IE11
1 parent a0c197a commit ff6fe1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export function genericHashLink(props, As) {
6565
scrollFunction =
6666
props.scroll ||
6767
(el =>
68-
el.scrollIntoView(props.smooth ? { behavior: 'smooth' } : undefined));
68+
props.smooth
69+
? el.scrollIntoView({ behavior: "smooth" })
70+
: el.scrollIntoView());
6971
hashLinkScroll();
7072
}
7173
}

0 commit comments

Comments
 (0)