mirror of
https://github.com/embarklabs/embark-mythx.git
synced 2025-01-20 07:29:28 +00:00
fix: Logger is undefined when unused fields present
This commit is contained in:
parent
7e9d7a1eae
commit
60473d1ba9
@ -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…
x
Reference in New Issue
Block a user