@royaloperahouse/harmonic 0.11.0-k → 0.11.0-l

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.
@@ -6252,11 +6252,19 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
6252
6252
  }, 500);
6253
6253
  }, []);
6254
6254
  useEffect(function () {
6255
- var _tabListRef$current, _tabListRef$current2;
6256
- var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
6257
- setTabsOverflow(tabsIsOverflowed);
6258
- setCanScrollToRight(tabsIsOverflowed);
6259
- }, [tabListRef]);
6255
+ if (typeof window === 'undefined') return undefined;
6256
+ var handleResize = function handleResize() {
6257
+ var _tabListRef$current, _tabListRef$current2;
6258
+ var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
6259
+ setTabsOverflow(tabsIsOverflowed);
6260
+ setCanScrollToRight(tabsIsOverflowed);
6261
+ };
6262
+ window.addEventListener('resize', handleResize);
6263
+ handleResize(); // Initial check
6264
+ return function () {
6265
+ window.removeEventListener('resize', handleResize);
6266
+ };
6267
+ }, []);
6260
6268
  useEffect(function () {
6261
6269
  var scrollTriggerCheck = function scrollTriggerCheck() {
6262
6270
  var elementGap = 100;