From dbcdf95162e7bc6ec7a5c60aa3fdc191fe8fe750 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 22 Dec 2017 14:32:45 +0000 Subject: [PATCH] Travis build: 117 --- docs/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.html b/docs/index.html index 734b92754..b98e50408 100644 --- a/docs/index.html +++ b/docs/index.html @@ -596,6 +596,7 @@ Omit the second argument to determine if the element is entirely visible, or spe it is partially visible.

const elementIsVisibleInViewport = (el, partiallyVisible = false) => {
   const { top, left, bottom, right } = el.getBoundingClientRect();
+  const { innerHeight, innerWidth } = window;
   return partiallyVisible
     ? ((top > 0 && top < innerHeight) || (bottom > 0 && bottom < innerHeight)) &&
       ((left > 0 && left < innerWidth) || (right > 0 && right < innerWidth))