Skip to content

Commit b835063

Browse files
committed
remove dependency on the yet to be released feature getRoutes()
1 parent ef0a065 commit b835063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/generate-doc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ function assignRoutes (router, doc, basePath, prefixPath = '', iter = 0, strippe
99

1010
if (subRoutes.length > 0) {
1111
subRoutes.forEach((routeLayer) => {
12-
const p = router.getRoutes()[0].path.split('/')[1]
12+
const p = routeLayer.pathPatterns
1313

1414
if (prefixPath.replaceAll('/', '').trim() !== p || iter > 1) {
15-
prefixPath += `/${p}` // Prevents basePath from being added twice
15+
prefixPath += p // Prevents basePath from being added twice
1616
} else {
1717
stripped = true // Set stripped to true for later
1818
}

0 commit comments

Comments
 (0)