Skip to content

Commit 93a34dd

Browse files
skipjackbebraw
authored andcommitted
refactor(sidebar): fix _isOpen test
1 parent eb9e20b commit 93a34dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/sidebar-item/sidebar-item.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default class SidebarItem extends React.Component {
6464
* @param {object} props - The current props
6565
*/
6666
_isOpen(props) {
67-
return `/${props.currentPage}` === props.url;
67+
return RegExp(`${props.currentPage}/?$`).test(props.url);
6868
}
6969

7070
/**

0 commit comments

Comments
 (0)