File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3115,7 +3115,9 @@ export class LuaTransformer {
31153115 statements . push (
31163116 tstl . createAssignmentStatement ( lhs . map ( i => this . createExportedIdentifier ( i ) ) , rhs , parent ) ) ;
31173117 } else {
3118- if ( tsOriginal && tsHelper . findFirstNodeAbove ( tsOriginal , ts . isFunctionLike ) ) {
3118+ // TODO this check probably should be moved out of this function or be improved?
3119+ if ( tsOriginal &&
3120+ ( ts . isFunctionLike ( tsOriginal ) || tsHelper . findFirstNodeAbove ( tsOriginal , ts . isFunctionLike ) ) ) {
31193121 // Separate declaration from assignment to allow for recursion
31203122 statements . push ( tstl . createVariableDeclarationStatement ( lhs , undefined , parent ) ) ;
31213123 statements . push ( tstl . createAssignmentStatement ( lhs , rhs , parent ) ) ;
You can’t perform that action at this time.
0 commit comments