We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 748762c commit 51a5734Copy full SHA for 51a5734
index.js
@@ -9,7 +9,7 @@ const isEdge = /Edge\/\d./i.test(navigator.userAgent);
9
// This needs a polyfill to work on all browsers. The polyfill is not included in order to keep the package light.
10
function useResizeObserver(ref, callback) {
11
useEffect(() => {
12
- if (ResizeObserver) {
+ if (window.ResizeObserver) {
13
const resizeObserver = new ResizeObserver((entries) => {
14
callback(entries[0].contentRect);
15
});
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "react-element-scroll-hook",
3
- "version": "1.0.7",
+ "version": "1.0.8",
4
"description": "A react hook to use the scroll information of an element",
5
"main": "index.js",
6
"repository": {
0 commit comments