use-scroll-bar
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -29,3 +29,2 @@ "use strict"; | ||
var handler = function () { | ||
console.log('hanlder function'); | ||
var newScrollY = window.scrollY; | ||
@@ -51,8 +50,10 @@ var newScrollX = window.scrollX; | ||
react_1.useEffect(function () { | ||
window.addEventListener('scroll', handler); | ||
return function () { | ||
window.removeEventListener('scroll', handler); | ||
}; | ||
if (typeof window !== 'undefined') { | ||
window.addEventListener('scroll', handler); | ||
return function () { | ||
window.removeEventListener('scroll', handler); | ||
}; | ||
} | ||
return undefined; | ||
}, []); | ||
console.log('data = ', data); | ||
return data; | ||
@@ -59,0 +60,0 @@ } |
{ | ||
"name": "use-scroll-bar", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Get information of window scrollbar like current position and direction of last scroll.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
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
75
4869