Skip to content

Commit

Permalink
chore: added a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SwatiEY committed Sep 13, 2024
1 parent da77414 commit 5b5e461
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ FunctionCall: {
decNode.declarations[0].isAccessed = true;
decNode.declarations[0].interactsWithSecret = true;
state.decNode ??= [];

const decNodeNames = state.decNode.map(node => node.declarations[0].name);
decNodeNames.includes(decNode.declarations[0].name) ? state.decNode : state.decNode.push(decNode);
}
Expand Down Expand Up @@ -591,7 +592,10 @@ FunctionCall: {
newNode.expression = state.initNode;
}

parent._newASTPointer.interactsWithSecret ? state.returnPara.push(returnPara) : ' ';
if(parent._newASTPointer.interactsWithSecret && !(state.returnPara?.includes(returnPara))) {
state.returnPara ??= [];
state.returnPara.push(returnPara);
}
})
} else {
newNode = buildNode('InternalFunctionCall', {
Expand Down

0 comments on commit 5b5e461

Please sign in to comment.