Commit 34619706 authored by Iuri Matias's avatar Iuri Matias

remove node.kind check since this is not necessarily present in ast trees and…

remove node.kind check since this is not necessarily present in ast trees and nodeType is sufficient
parent 528a67da
......@@ -35,7 +35,7 @@ function getAvailableFunctions (fileAST: AstNode, testContractName: string) {
if(fileAST.nodes && fileAST.nodes.length > 0) {
const contractAST: AstNode[] = fileAST.nodes.filter(node => node.name === testContractName && node.nodeType === 'ContractDefinition')
if(contractAST.length > 0 && contractAST[0].nodes) {
const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => node.kind === 'function' && node.nodeType === "FunctionDefinition")
const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => node.nodeType === "FunctionDefinition")
funcList = funcNodes.map(node => node.name)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment