@zero-library/common 2.3.8 → 2.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2083,10 +2083,11 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
2083
2083
  });
2084
2084
  }, 300);
2085
2085
  React.useEffect(() => {
2086
- if (!containerRef.current) return;
2087
- containerRef.current.addEventListener("scroll", onScroll, { passive: true });
2086
+ const el = containerRef.current;
2087
+ if (!el) return;
2088
+ el.addEventListener("scroll", onScroll, { passive: true });
2088
2089
  return () => {
2089
- containerRef.current.removeEventListener("scroll", onScroll);
2090
+ el.removeEventListener("scroll", onScroll);
2090
2091
  if (rAFRef.current) cancelAnimationFrame(rAFRef.current);
2091
2092
  };
2092
2093
  }, [virtualizer, images]);