react-remove-scroll
Advanced tools
Comparing version 2.5.9 to 2.5.10
@@ -6,2 +6,5 @@ var alwaysContainsScroll = function (node) { | ||
var elementCanBeScrolled = function (node, overflow) { | ||
if (!(node instanceof Element)) { | ||
return false; | ||
} | ||
var styles = window.getComputedStyle(node); | ||
@@ -26,4 +29,4 @@ return ( | ||
if (isScrollable) { | ||
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2]; | ||
if (s > d) { | ||
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2]; | ||
if (scrollHeight > clientHeight) { | ||
return true; | ||
@@ -30,0 +33,0 @@ } |
@@ -5,2 +5,5 @@ const alwaysContainsScroll = (node) => | ||
const elementCanBeScrolled = (node, overflow) => { | ||
if (!(node instanceof Element)) { | ||
return false; | ||
} | ||
const styles = window.getComputedStyle(node); | ||
@@ -25,4 +28,4 @@ return ( | ||
if (isScrollable) { | ||
const [, s, d] = getScrollVariables(axis, current); | ||
if (s > d) { | ||
const [, scrollHeight, clientHeight] = getScrollVariables(axis, current); | ||
if (scrollHeight > clientHeight) { | ||
return true; | ||
@@ -29,0 +32,0 @@ } |
@@ -9,2 +9,5 @@ "use strict"; | ||
var elementCanBeScrolled = function (node, overflow) { | ||
if (!(node instanceof Element)) { | ||
return false; | ||
} | ||
var styles = window.getComputedStyle(node); | ||
@@ -29,4 +32,4 @@ return ( | ||
if (isScrollable) { | ||
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2]; | ||
if (s > d) { | ||
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2]; | ||
if (scrollHeight > clientHeight) { | ||
return true; | ||
@@ -33,0 +36,0 @@ } |
{ | ||
"name": "react-remove-scroll", | ||
"version": "2.5.9", | ||
"version": "2.5.10", | ||
"description": "Disables scroll outside of `children` node.", | ||
@@ -5,0 +5,0 @@ "main": "dist/es5/index.js", |
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
78985
1620