We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f24ee8 commit 157b442Copy full SHA for 157b442
src/LuaTransformer.ts
@@ -3142,7 +3142,7 @@ export class LuaTransformer {
3142
3143
const insideFunction = this.scopeStack.some(s => s.type === ScopeType.Function);
3144
const isLetOrConst = tsOriginal && ts.isVariableDeclaration(tsOriginal)
3145
- && (tsOriginal.parent.flags & (ts.NodeFlags.Let | ts.NodeFlags.Const)) !== 0;
+ && tsOriginal.parent && (tsOriginal.parent.flags & (ts.NodeFlags.Let | ts.NodeFlags.Const)) !== 0;
3146
if (this.isModule || this.currentNamespace || insideFunction || isLetOrConst) {
3147
// local
3148
const isFunction =
0 commit comments