diff --git a/.gitignore b/.gitignore index ad46b30..9972163 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ build/Release # Dependency directories node_modules/ jspm_packages/ +package-lock.json # TypeScript v1 declaration files typings/ diff --git a/index.js b/index.js index 7c8d3a5..48c8e2f 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ import { useEffect, useRef, useState, useCallback } from 'react'; // Edge has a bug where scrollHeight is 1px bigger than clientHeight when there's no scroll. -const isEdge = typeof navigator !== 'undefined' && /Edge\/\d./i.test(window.navigator.userAgent); +const isEdge = typeof navigator !== 'undefined' && /Edge\/\d./i.test(navigator.userAgent); // Small hook to use ResizeOberver if available. This fixes some issues when the component is resized. // This needs a polyfill to work on all browsers. The polyfill is not included in order to keep the package light.