react-scroll-to-top
Advanced tools
Comparing version 0.1.2 to 0.1.3
"use strict"; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_1 = require("react"); | ||
var react_1 = __importStar(require("react")); | ||
function scrollToTop() { | ||
@@ -12,3 +19,2 @@ document.documentElement.scrollTop = 0; | ||
document.addEventListener("scroll", onScroll); | ||
// Remove listener on unmount | ||
return function () { return document.removeEventListener("scroll", onScroll); }; | ||
@@ -15,0 +21,0 @@ }); |
{ | ||
"name": "react-scroll-to-top", | ||
"author": "Herman Nygaard", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "lib/ScrollToTop.js", | ||
@@ -6,0 +6,0 @@ "types": "lib/ScrollToTop.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3973
58