update smoothScroll, ES6 fix

This commit is contained in:
Stefan Feješ
2018-03-02 17:23:09 +01:00
parent 3173e689e2
commit ad69fbff7a

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'
});