From 89616537b8bc01329bc773d4610f21a67c7f2b03 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 15 Mar 2018 16:38:20 -0400 Subject: [PATCH] refactor command handler --- lib/dashboard/dashboard.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/dashboard/dashboard.js b/lib/dashboard/dashboard.js index 735706cd..2ce994fb 100644 --- a/lib/dashboard/dashboard.js +++ b/lib/dashboard/dashboard.js @@ -35,9 +35,7 @@ class Dashboard { self.events.on('status', monitor.setStatus.bind(monitor)); self.events.on('servicesState', monitor.availableServices.bind(monitor)); - self.events.setCommandHandler("console:command", (cmd, cb) => { - cb(monitor.executeCmd(cmd)); - }); + self.events.setCommandHandler("console:command", monitor.executeCmd.bind(monitor)); self.logger.info('========================'.bold.green); self.logger.info(('Welcome to Embark ' + self.version).yellow.bold);