File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -3665,9 +3665,8 @@ export class LuaTransformer {
36653665 const insideFunction = this . findScope ( ScopeType . Function ) !== undefined ;
36663666 let isLetOrConst = false ;
36673667 let isFirstDeclaration = true ; // var can have multiple declarations for the same variable :/
3668- if ( tsOriginal && ts . isVariableDeclaration ( tsOriginal ) ) {
3669- isLetOrConst = tsOriginal . parent
3670- && ( tsOriginal . parent . flags & ( ts . NodeFlags . Let | ts . NodeFlags . Const ) ) !== 0 ;
3668+ if ( tsOriginal && ts . isVariableDeclaration ( tsOriginal ) && tsOriginal . parent ) {
3669+ isLetOrConst = ( tsOriginal . parent . flags & ( ts . NodeFlags . Let | ts . NodeFlags . Const ) ) !== 0 ;
36713670 isFirstDeclaration = isLetOrConst || tsHelper . isFirstDeclaration ( tsOriginal , this . checker ) ;
36723671 }
36733672 if ( ( this . isModule || this . currentNamespace || insideFunction || isLetOrConst ) && isFirstDeclaration ) {
You can’t perform that action at this time.
0 commit comments