minor refactor: simplify options setting

This commit is contained in:
Iuri Matias 2017-12-16 11:11:29 -05:00
parent fb8d3c4c0a
commit 26b070b27f
1 changed files with 5 additions and 5 deletions

View File

@ -2,18 +2,18 @@ let blessed = require("blessed");
let CommandHistory = require('./command_history.js');
class Dashboard {
constructor(options) {
let title = (options && options.title) || "Embark " + options.version;
constructor(_options) {
let options = _options || {};
this.env = options.env;
this.console = options.console;
this.history = new CommandHistory();
this.color = (options && options.color) || "green";
this.minimal = (options && options.minimal) || false;
this.color = options.color || "green";
this.minimal = options.minimal || false;
this.screen = blessed.screen({
smartCSR: true,
title: title,
title: options.title || ("Embark " + options.version),
dockBorders: false,
fullUnicode: true,
autoPadding: true