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