Skip to content

Commit

Permalink
[HTTP] Copy array returned by getRoutes (elastic#195647)
Browse files Browse the repository at this point in the history
## Summary

Small follow up based on
elastic#192675 (comment)
  • Loading branch information
jloleysens authored Oct 10, 2024
1 parent f687ce2 commit a481da6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo
if (excludeVersionedRoutes) {
return this.routes.filter((route) => !route.isVersioned);
}
return this.routes;
return [...this.routes];
}

public handleLegacyErrors = wrapErrors;
Expand Down

0 comments on commit a481da6

Please sign in to comment.