Comparing version 0.1.1 to 0.1.2
@@ -105,3 +105,3 @@ (function (global, factory) { | ||
var rect = element.getBoundingClientRect(); | ||
return rect.bottom > 0 - offset && rect.right > 0 - offset && rect.left < viewportWidth + offset && rect.top < viewportHeight + offset; | ||
return !!(rect.width && rect.height) && rect.bottom > 0 - offset && rect.right > 0 - offset && rect.left < viewportWidth + offset && rect.top < viewportHeight + offset; | ||
} | ||
@@ -108,0 +108,0 @@ return false; |
@@ -6,3 +6,4 @@ import ViewportObserver from './viewport-observer' | ||
const rect = element.getBoundingClientRect() | ||
return rect.bottom > 0 - offset && | ||
return !!(rect.width && rect.height) && | ||
rect.bottom > 0 - offset && | ||
rect.right > 0 - offset && | ||
@@ -9,0 +10,0 @@ rect.left < viewportWidth + offset && |
{ | ||
"name": "viewprt", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "viewport observation tool", | ||
@@ -5,0 +5,0 @@ "author": "Garth Poitras <garth22@gmail.com>", |
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
16391
324