File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ export class RouteRegistry {
449449 * Execute a route handler with middleware pipeline
450450 *
451451 * Executes the full middleware pipeline:
452+ * 0. CORS - Handle CORS headers and preflight
452453 * 1. Guards - Authorization checks
453454 * 2. Body parsing - Parse request body if present
454455 * 3. Pipes - Transform/validate body
Original file line number Diff line number Diff line change @@ -71,9 +71,8 @@ export function createParamDecorator(
7171 ] ;
7272
7373 // Check if this parameter index already has metadata
74- const existingIndex = existingParams . findIndex ( ( p ) => p . index === parameterIndex ) ;
75- if ( existingIndex !== - 1 ) {
76- const existing = existingParams [ existingIndex ] ;
74+ const existing = existingParams . find ( ( p ) => p . index === parameterIndex ) ;
75+ if ( existing ) {
7776 const existingDecoratorName = PARAM_TYPE_TO_DECORATOR_NAME [ existing . type ] ;
7877 throw new Error (
7978 `${ decoratorName } decorator: parameter at index ${ parameterIndex } already has @${ existingDecoratorName } decorator applied. ` +
You can’t perform that action at this time.
0 commit comments