@idkwebsites/components 0.1.20 → 0.1.21

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 CHANGED
@@ -2250,7 +2250,8 @@ function BookingWidgetPanel({
2250
2250
  const wrap = el.querySelector(".bw-svc-scroll-wrap");
2251
2251
  if (wrap) requestAnimationFrame(() => initSvcScrollbar(wrap));
2252
2252
  } else {
2253
- if (svcScrollbarRef.current) {
2253
+ const wrap = el.querySelector(".bw-svc-scroll-wrap");
2254
+ if (svcScrollbarRef.current && wrap && svcScrollbarRef.current.containerEl === wrap) {
2254
2255
  svcScrollbarRef.current.scrollTo(0, 0, 0);
2255
2256
  try {
2256
2257
  svcScrollbarRef.current.destroy();