update smoothScroll, ES6 fix

This commit is contained in:
Stefan Feješ
2018-03-02 17:23:09 +01:00
parent 77cc7bb3cd
commit 1257cc418a

View File

@ -5,7 +5,7 @@ Smoothly scrolls the element on which it's called into the visible area of the b
Use `.scrollIntoView` method to scroll the element. Pass `{ behavior: 'smooth' }` to `.scrollIntoView` so it scrolls smoothly.
```js
const smoothScroll = (element) =>
const smoothScroll = element =>
document.querySelector(element).scrollIntoView({
behavior: 'smooth'
});