react-better-html 1.1.259 → 1.1.260
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
|
@@ -7940,10 +7940,10 @@ var MenuItemComponent = memo27(function MenuItemComponent2({
|
|
|
7940
7940
|
const isActive2 = location.pathname === "/" ? location.pathname === item.href : location.pathname.startsWith(item.href) && item.href !== "/";
|
|
7941
7941
|
if (!isActive2) return;
|
|
7942
7942
|
setActiveItem(
|
|
7943
|
-
(oldValue) => item.href
|
|
7943
|
+
(oldValue) => item.href && item.href !== oldValue?.href ? {
|
|
7944
7944
|
href: item.href,
|
|
7945
7945
|
length: item.href.length
|
|
7946
|
-
} :
|
|
7946
|
+
} : oldValue
|
|
7947
7947
|
);
|
|
7948
7948
|
}, [location.pathname]);
|
|
7949
7949
|
useEffect16(() => {
|