File tree 1 file changed +6
-6
lines changed
src/compiler/transformers
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -374,18 +374,18 @@ namespace ts {
374
374
}
375
375
376
376
function transformConstructorBody ( node : ClassDeclaration | ClassExpression , constructor : ConstructorDeclaration | undefined , isDerivedClass : boolean ) {
377
- resumeLexicalEnvironment ( ) ;
378
-
379
- let indexOfFirstStatement = 0 ;
380
- let statements : Statement [ ] = [ ] ;
381
-
382
377
const properties = getInitializedProperties ( node , /*isStatic*/ false ) ;
383
378
384
379
// Only generate synthetic constructor when there are property initializers to move.
385
380
if ( ! constructor && ! some ( properties ) ) {
386
- return undefined ;
381
+ return visitFunctionBody ( /*node*/ undefined , visitor , context ) ;
387
382
}
388
383
384
+ resumeLexicalEnvironment ( ) ;
385
+
386
+ let indexOfFirstStatement = 0 ;
387
+ let statements : Statement [ ] = [ ] ;
388
+
389
389
if ( ! constructor && isDerivedClass ) {
390
390
// Add a synthetic `super` call:
391
391
//
You can’t perform that action at this time.
0 commit comments