Skip to content

Commit d79f027

Browse files
authored
Merge pull request #8 from emizzle/fix/logger-undefined
fix: Logger is undefined when unused fields present
2 parents 5c2056a + 60473d1 commit d79f027

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/mythXUtil.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const cleanAnalyzeDataEmptyProps = (data, debug, logger) => {
162162
}
163163

164164
if (debug && unusedFields.length > 0) {
165-
logger(`${props.contractName}: Empty JSON data fields from compilation - ${unusedFields.join(', ')}`);
165+
logger.debug(`${props.contractName}: Empty JSON data fields from compilation - ${unusedFields.join(', ')}`);
166166
}
167167

168168
return result;

mythx.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const doAnalysis = async (armletClient, config, contracts, contractNames = null,
115115
initialDelay
116116
};
117117

118-
analyzeOpts.data = mythXUtil.cleanAnalyzeDataEmptyProps(obj.buildObj, config.debug, config.logger.debug);
118+
analyzeOpts.data = mythXUtil.cleanAnalyzeDataEmptyProps(obj.buildObj, config.debug, config.logger);
119119
analyzeOpts.data.analysisMode = config.full ? "full" : "quick";
120120
if (config.debug > 1) {
121121
config.logger.debug("analyzeOpts: " + `${util.inspect(analyzeOpts, { depth: null })}`);

0 commit comments

Comments
 (0)