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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7373,8 +7373,8 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
|
|
|
7373
7373
|
const toBeOpened = item.children.some(
|
|
7374
7374
|
(child) => child.href ? location.pathname === "/" ? location.pathname === child.href : location.pathname.startsWith(child.href) && child.href !== "/" : false
|
|
7375
7375
|
);
|
|
7376
|
-
setIsOpened.setState(toBeOpened);
|
|
7377
|
-
}, [item]);
|
|
7376
|
+
if (!isCollapsed) setIsOpened.setState(toBeOpened);
|
|
7377
|
+
}, [item, isCollapsed]);
|
|
7378
7378
|
useEffect16(() => {
|
|
7379
7379
|
if (!isCollapsed) return;
|
|
7380
7380
|
setIsOpened.setFalse();
|