From cdf46f2b305fdca8ed8ecb2e926702543c2fe6c0 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Tue, 8 May 2018 10:53:34 -0500 Subject: [PATCH] fix linting errors and clean up ze code Signed-off-by: VoR0220 --- lib/core/engine.js | 2 +- lib/modules/profiler/index.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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() {