Skip to content

Commit f0d662b

Browse files
authored
fix: access router in getRoutes (#1510)
1 parent a6e8cf4 commit f0d662b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default class App {
114114
* checked that this works as expected whenever updating Express dependencies.
115115
*/
116116
private getRoutes() {
117-
return (this.app._router as IRegisteredRoutes).stack.reduce(
117+
return (this.app.router as unknown as IRegisteredRoutes).stack.reduce(
118118
(acc, middleware) => {
119119
if (middleware.route) {
120120
// This middleware is a route mounted directly on the app (i.e. app.get('/test', fn)

0 commit comments

Comments
 (0)