Skip to content

Commit

Permalink
fix: access router in getRoutes (#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
Imod7 authored Oct 10, 2024
1 parent a6e8cf4 commit f0d662b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class App {
* checked that this works as expected whenever updating Express dependencies.
*/
private getRoutes() {
return (this.app._router as IRegisteredRoutes).stack.reduce(
return (this.app.router as unknown as IRegisteredRoutes).stack.reduce(
(acc, middleware) => {
if (middleware.route) {
// This middleware is a route mounted directly on the app (i.e. app.get('/test', fn)
Expand Down

0 comments on commit f0d662b

Please sign in to comment.