diff --git a/src/components/ApiDocViewer.tsx b/src/components/ApiDocViewer.tsx index fd0b537..073df2d 100644 --- a/src/components/ApiDocViewer.tsx +++ b/src/components/ApiDocViewer.tsx @@ -106,8 +106,9 @@ export const ApiDocViewer = ({ onDocsPathChange, showAddModal, onCloseAddModal } }, [externalDocs]) const handleFolderClick = useCallback((folderPath: string) => { - const sameNamePath = `${folderPath}/${folderPath}.md` - const sameNameDoc = externalDocs.find(d => d.relativePath === sameNamePath) + const sameNameDoc = externalDocs.find(d => + d.relativePath.endsWith(`/${folderPath}.md`) + ) if (sameNameDoc) { setSelectedPath(sameNameDoc.relativePath.replace(/^api\//, ''))