Merge pull request #8 from emizzle/fix/logger-undefined
fix: Logger is undefined when unused fields present
This commit is contained in:
commit
d79f027722
|
@ -162,7 +162,7 @@ const cleanAnalyzeDataEmptyProps = (data, debug, logger) => {
|
|||
}
|
||||
|
||||
if (debug && unusedFields.length > 0) {
|
||||
logger(`${props.contractName}: Empty JSON data fields from compilation - ${unusedFields.join(', ')}`);
|
||||
logger.debug(`${props.contractName}: Empty JSON data fields from compilation - ${unusedFields.join(', ')}`);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
2
mythx.js
2
mythx.js
|
@ -115,7 +115,7 @@ const doAnalysis = async (armletClient, config, contracts, contractNames = null,
|
|||
initialDelay
|
||||
};
|
||||
|
||||
analyzeOpts.data = mythXUtil.cleanAnalyzeDataEmptyProps(obj.buildObj, config.debug, config.logger.debug);
|
||||
analyzeOpts.data = mythXUtil.cleanAnalyzeDataEmptyProps(obj.buildObj, config.debug, config.logger);
|
||||
analyzeOpts.data.analysisMode = config.full ? "full" : "quick";
|
||||
if (config.debug > 1) {
|
||||
config.logger.debug("analyzeOpts: " + `${util.inspect(analyzeOpts, { depth: null })}`);
|
||||
|
|
Loading…
Reference in New Issue