!273 fix load obj

Merge pull request !273 from zrg/cherry-pick-1653448419
This commit is contained in:
openharmony_ci
2022-05-26 15:02:16 +00:00
committed by Gitee
+1 -1
View File
@@ -138,7 +138,7 @@ export function addVariableToScope(recorder: Recorder, enableTypeRecord: boolean
let funcNode = decl.node;
if (ts.isFunctionDeclaration(funcNode)) {
v = scope.add(decl, VarDeclarationKind.FUNCTION);
} else {
} else if (ts.isFunctionExpression(funcNode)) {
let functionScope = <Scope>recorder.getScopeOfNode(funcNode);
v = functionScope.add(decl, VarDeclarationKind.FUNCTION);
}