react-better-html 1.1.226 → 1.1.227

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
@@ -7407,8 +7407,8 @@ var MenuItemComponent = (0, import_react31.memo)(function MenuItemComponent2({ i
7407
7407
  const toBeOpened = item.children.some(
7408
7408
  (child) => child.href ? location.pathname === "/" ? location.pathname === child.href : location.pathname.startsWith(child.href) && child.href !== "/" : false
7409
7409
  );
7410
- setIsOpened.setState(toBeOpened);
7411
- }, [item]);
7410
+ if (!isCollapsed) setIsOpened.setState(toBeOpened);
7411
+ }, [item, isCollapsed]);
7412
7412
  (0, import_react31.useEffect)(() => {
7413
7413
  if (!isCollapsed) return;
7414
7414
  setIsOpened.setFalse();