@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.js CHANGED
@@ -2215,7 +2215,8 @@ function BookingWidgetPanel({
2215
2215
  const wrap = el.querySelector(".bw-svc-scroll-wrap");
2216
2216
  if (wrap) requestAnimationFrame(() => initSvcScrollbar(wrap));
2217
2217
  } else {
2218
- if (svcScrollbarRef.current) {
2218
+ const wrap = el.querySelector(".bw-svc-scroll-wrap");
2219
+ if (svcScrollbarRef.current && wrap && svcScrollbarRef.current.containerEl === wrap) {
2219
2220
  svcScrollbarRef.current.scrollTo(0, 0, 0);
2220
2221
  try {
2221
2222
  svcScrollbarRef.current.destroy();