Skip to content

Commit d7c7e29

Browse files
committed
guarding register routes
1 parent 085d8bd commit d7c7e29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/esm/fixtures/express/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ app.use((req: any, res: any, next: express.NextFunction) => {
1717
req.stringValue = 'fancyStringForContext';
1818
next();
1919
});
20-
RegisterRoutes(app);
20+
if (RegisterRoutes) RegisterRoutes(app);
2121

2222
// It's important that this come after the main routes are registered
2323
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {

0 commit comments

Comments
 (0)