Add callback to beforeArt

This commit is contained in:
Bryan Ashby 2016-06-28 23:06:35 -06:00
parent 8567692238
commit c2ee05bd51
1 changed files with 4 additions and 3 deletions

View File

@ -46,8 +46,7 @@ function MenuModule(options) {
async.series( async.series(
[ [
function beforeDisplayArt(callback) { function beforeDisplayArt(callback) {
self.beforeArt(); self.beforeArt(callback);
callback(null);
}, },
function displayMenuArt(callback) { function displayMenuArt(callback) {
if(_.isString(self.menuConfig.art)) { if(_.isString(self.menuConfig.art)) {
@ -247,7 +246,7 @@ MenuModule.prototype.leave = function() {
this.detachViewControllers(); this.detachViewControllers();
}; };
MenuModule.prototype.beforeArt = function() { MenuModule.prototype.beforeArt = function(cb) {
if(this.cls) { if(this.cls) {
this.client.term.write(ansi.resetScreen()); this.client.term.write(ansi.resetScreen());
} }
@ -255,6 +254,8 @@ MenuModule.prototype.beforeArt = function() {
if(_.isNumber(this.menuConfig.options.baudRate)) { if(_.isNumber(this.menuConfig.options.baudRate)) {
this.client.term.write(ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate)); this.client.term.write(ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate));
} }
return cb(null);
}; };
MenuModule.prototype.mciReady = function(mciData, cb) { MenuModule.prototype.mciReady = function(mciData, cb) {