From 91cd64f8ecb78326a16aa9bbbda0bfddd9127ceb Mon Sep 17 00:00:00 2001 From: Kladdkaka Date: Sun, 17 Dec 2017 11:55:41 +0100 Subject: [PATCH] changing _ to () --- snippets/scroll-to-top.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/scroll-to-top.md b/snippets/scroll-to-top.md index 6c82190a4..19064a5d5 100644 --- a/snippets/scroll-to-top.md +++ b/snippets/scroll-to-top.md @@ -4,7 +4,7 @@ Get distance from top using `document.documentElement.scrollTop` or `document.bo Scroll by a fraction of the distance from top. Use `window.requestAnimationFrame()` to animate the scrolling. ```js -const scrollToTop = _ => { +const scrollToTop = () => { const c = document.documentElement.scrollTop || document.body.scrollTop; if (c > 0) { window.requestAnimationFrame(scrollToTop);