diff --git a/lib/core/engine.js b/lib/core/engine.js index fe11a6fb..634f019d 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -189,7 +189,7 @@ class Engine { }); this.registerModule('profiler', { events: this.events, - logger: this.logger, + logger: this.logger }); this.contractsManager = new ContractsManager({ diff --git a/lib/modules/profiler/index.js b/lib/modules/profiler/index.js index be33c67d..ed5f87c8 100644 --- a/lib/modules/profiler/index.js +++ b/lib/modules/profiler/index.js @@ -27,14 +27,14 @@ class Profiler { } formatParams(params) { - if (undefined !== params && params.length) { - let paramString = "("; - let mappedParams = params.map(param => param.type); - paramString += mappedParams.join(',') - paramString += ")"; - return paramString; + if (!params || !params.length) { + return "()"; } - return "()"; + let paramString = "("; + let mappedParams = params.map(param => param.type); + paramString += mappedParams.join(','); + paramString += ")"; + return paramString; } registerConsoleCommand() {