Skip to content

Commit

Permalink
fix: in the circuit when internal functions are not imported the impo…
Browse files Browse the repository at this point in the history
…rt statement list is not updated
  • Loading branch information
lydiagarms committed May 24, 2024
1 parent 0415c4c commit 838924d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ const internalCallVisitor = {
state.state.newReturnParameterList.splice(nodeIndex,1);
}
})
} else if (childNode.nodeType === 'ImportStatementList'){
state.newImportStatementList = cloneDeep(childNode.imports);
}
})
if(state.circuitImport[index].isImported ==='true') {
Expand Down Expand Up @@ -458,6 +460,8 @@ const internalCallVisitor = {
childNode.body.postStatements.splice(!dupNode.index ? 0 : dupNode.index +1, 0, dupNode.node);
});
reorderBoilerPlate(childNode.body.postStatements);
} else if (childNode.nodeType === 'ImportStatementList'){
childNode.imports = [...new Set([...childNode.imports, ...state.newImportStatementList])];
}

})
Expand Down

0 comments on commit 838924d

Please sign in to comment.