From f0d662bb12661b5e04a948f20f4da6d62fd0cb45 Mon Sep 17 00:00:00 2001 From: Dominique Date: Thu, 10 Oct 2024 15:16:04 +0200 Subject: [PATCH] fix: access router in getRoutes (#1510) --- src/App.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.ts b/src/App.ts index 2a79dcf2d..8b528acb5 100644 --- a/src/App.ts +++ b/src/App.ts @@ -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)