We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e71268b commit 2d494ebCopy full SHA for 2d494eb
packages/event-handler/src/rest/RouteHandlerRegistry.ts
@@ -111,6 +111,9 @@ class RouteHandlerRegistry {
111
this.#logger.warn(
112
`Handler for method: ${route.method} and path: ${route.path} already exists. The previous handler will be replaced.`
113
);
114
+ // as dynamic routes are stored in an array, we can't rely on
115
+ // overwriting a key in a map like with static routes so have
116
+ // to manually manage duplicate routes
117
const index = this.#dynamicRoutesIndexMap.get(route.id)!;
118
this.#dynamicRoutes.splice(index, 1);
119
}
0 commit comments