Skip to content

Commit 14ba635

Browse files
guyiussapegin
authored andcommitted
Fix: Incorrect current section highlighting on partial match (styleguidist#1239)
Closes styleguidist#1237
1 parent 886b719 commit 14ba635

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/rsg-components/ComponentsList/ComponentsListRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import cx from 'classnames';
44
import Link from 'rsg-components/Link';
55
import Styled from 'rsg-components/Styled';
6-
import { hasInHash, getHash } from '../../utils/handleHash';
6+
import { getHash } from '../../utils/handleHash';
77

88
const styles = ({ color, fontFamily, fontSize, space, mq }) => ({
99
list: {
@@ -48,7 +48,7 @@ export function ComponentsListRenderer({ classes, items }) {
4848
return (
4949
<ul className={classes.list}>
5050
{items.map(({ heading, visibleName, href, content, external }) => {
51-
const isItemSelected = hasInHash(windowHash, href);
51+
const isItemSelected = windowHash === href;
5252
return (
5353
<li
5454
className={cx(

0 commit comments

Comments
 (0)