Skip to content

Commit

Permalink
[8.x] [HTTP] Copy array returned by `getRoutes` (#195647) (#…
Browse files Browse the repository at this point in the history
…195714)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[HTTP] Copy array returned by `getRoutes`
(#195647)](#195647)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T08:53:59Z","message":"[HTTP]
Copy array returned by `getRoutes` (#195647)\n\n## Summary\r\n\r\nSmall
follow up based
on\r\nhttps://github.com//pull/192675#discussion_r1793601519","sha":"a481da68e58cb20d6407c9866c1511717addfdb0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:http","Team:Core","release_note:skip","v9.0.0","v8.16.0","backport:version"],"title":"[HTTP]
Copy array returned by
`getRoutes`","number":195647,"url":"https://github.com/elastic/kibana/pull/195647","mergeCommit":{"message":"[HTTP]
Copy array returned by `getRoutes` (#195647)\n\n## Summary\r\n\r\nSmall
follow up based
on\r\nhttps://github.com//pull/192675#discussion_r1793601519","sha":"a481da68e58cb20d6407c9866c1511717addfdb0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195647","number":195647,"mergeCommit":{"message":"[HTTP]
Copy array returned by `getRoutes` (#195647)\n\n## Summary\r\n\r\nSmall
follow up based
on\r\nhttps://github.com//pull/192675#discussion_r1793601519","sha":"a481da68e58cb20d6407c9866c1511717addfdb0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jean-Louis Leysens <[email protected]>
  • Loading branch information
kibanamachine and jloleysens authored Oct 10, 2024
1 parent 2a40e11 commit 8bd34c4
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 8bd34c4

Please sign in to comment.