File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -154,20 +154,11 @@ export class ControllerClassVisitor extends AbstractFileVisitor {
154154 const removeExistingApiOperationDecorator =
155155 apiOperationDecoratorsArray . length > 0 ;
156156
157- const removeExistingApiResponseDecorator =
158- apiResponseDecoratorsArray . length > 0 ;
159-
160- let existingDecorators = decorators ;
161- if (
162- removeExistingApiOperationDecorator ||
163- removeExistingApiResponseDecorator
164- ) {
165- existingDecorators = decorators . filter (
166- ( item ) =>
167- getDecoratorName ( item ) !== ApiOperation . name &&
168- getDecoratorName ( item ) !== ApiResponse . name
169- ) ;
170- }
157+ const existingDecorators = removeExistingApiOperationDecorator
158+ ? decorators . filter (
159+ ( item ) => getDecoratorName ( item ) !== ApiOperation . name
160+ )
161+ : decorators ;
171162
172163 const modifiers = ts . getModifiers ( compilerNode ) ?? [ ] ;
173164 const objectLiteralExpr = this . createDecoratorObjectLiteralExpr (
You can’t perform that action at this time.
0 commit comments