<commit_before>var Menus = require('./menus');

var Connection = function(app, frontEndpoint) {
  this._app = app;

  // Current state
  this.frontEndpoint = frontEndpoint;
  this.backEndpoint = null;
  this.menu = null;
}

Connection.prototype.doAction = function(action) {
  // If there is a current menu, let it go/deinit
  if(this.menu !== null) {
    // De-init the menu
  }

  // If the action is a menu, init the new menu
  if(action.menu !== undefined) {
    // Init menu
    this.menu = new Menus.Basic(this._app, this.frontEndpoint, this._app.config.menus[action.menu]);
    this.menu.init(); // This will display the menu to the user and wait for an option to be selected
    return;
  }
<commit_msg>cleanup an if statement<commit_after>var Menus = require('./menus');

var Connection = function(app, frontEndpoint) {
  this._app = app;

  // Current state
  this.frontEndpoint = frontEndpoint;
  this.backEndpoint = null;
  this.menu = null;
}

Connection.prototype.doAction = function(action) {
  // If there is a current menu, let it go/deinit
  if(this.menu !== null) this.menu.deinit();

  // If the action is a menu, init the new menu
  if(action.menu !== undefined) {
    // Init menu
    this.menu = new Menus.Basic(this._app, this.frontEndpoint, this._app.config.menus[action.menu]);
    this.menu.init(); // This will display the menu to the user and wait for an option to be selected
    return;
  }

{'fraction_non_alphanumeric': 0.12517580872011252, 'fraction_numerical': 0.0, 'mean_word_length': 3.210059171597633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2529829', 'n_tokens_mistral': 445, 'n_tokens_neox': 440, 'n_words': 141}