diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/index.js b/packages/docusaurus-theme-classic/src/theme/DocPage/index.js
index f73c73cfc9..5dc094eb1b 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocPage/index.js
+++ b/packages/docusaurus-theme-classic/src/theme/DocPage/index.js
@@ -44,14 +44,15 @@ function DocPageContent({currentDocRoute, docsMetadata, children}) {
);
}
+// TODO can this be abstracted into the plugin instead of the theme?
function DocPage(props) {
const {
- route: {routes: subroutes},
+ route: {routes: docRoutes},
docsMetadata,
location,
} = props;
- const currentDocRoute = subroutes.find((subroute) =>
- matchPath(location.pathname, subroute),
+ const currentDocRoute = docRoutes.find((docRoute) =>
+ matchPath(location.pathname, docRoute),
);
if (!currentDocRoute) {
return ;
@@ -61,7 +62,7 @@ function DocPage(props) {
- {renderRoutes(subroutes)}
+ {renderRoutes(docRoutes)}
);