There was an error while loading. Please reload this page.
1 parent 14d9ddf commit b18e875Copy full SHA for b18e875
src/components/sidebar/tree.js
@@ -251,11 +251,12 @@ const Tree = ({ edges }) => {
251
items.forEach(item => {
252
const strippedUrl = stripNumbers(item.url)
253
254
- if (currentUrl.includes(strippedUrl) && currentUrl !== strippedUrl)
+ if (currentUrl.startsWith(strippedUrl) && currentUrl !== strippedUrl) {
255
setCollapsed({
256
...collapsed,
257
[strippedUrl]: false,
258
})
259
+ }
260
261
// Call function recursively if it has children
262
if (item.items?.length) processItems(item.items)
0 commit comments