@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.
@@ -6211,11 +6211,19 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
6211
6211
  }, 500);
6212
6212
  }, []);
6213
6213
  React.useEffect(function () {
6214
- var _tabListRef$current, _tabListRef$current2;
6215
- var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
6216
- setTabsOverflow(tabsIsOverflowed);
6217
- setCanScrollToRight(tabsIsOverflowed);
6218
- }, [tabListRef]);
6214
+ if (typeof window === 'undefined') return undefined;
6215
+ var handleResize = function handleResize() {
6216
+ var _tabListRef$current, _tabListRef$current2;
6217
+ var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
6218
+ setTabsOverflow(tabsIsOverflowed);
6219
+ setCanScrollToRight(tabsIsOverflowed);
6220
+ };
6221
+ window.addEventListener('resize', handleResize);
6222
+ handleResize(); // Initial check
6223
+ return function () {
6224
+ window.removeEventListener('resize', handleResize);
6225
+ };
6226
+ }, []);
6219
6227
  React.useEffect(function () {
6220
6228
  var scrollTriggerCheck = function scrollTriggerCheck() {
6221
6229
  var elementGap = 100;