<commit_before>// Extension to the core ModalContainer.js to refresh the accounts dropdown everytime modal window is closed

Ensembl.Panel.ModalContainer = Ensembl.Panel.ModalContainer.extend({
  hide: function () {
    this.base.apply(this, arguments);

    if (this.el.find('._needs_refresh_on_hide').removeClass('_needs_refresh_on_hide').length) {
      Ensembl.EventManager.trigger('refreshAccountsDropdown');
    }
  }
});<commit_msg>stop error where el and elLk references have been nullified by a redirect<commit_after>// Extension to the core ModalContainer.js to refresh the accounts dropdown everytime modal window is closed

Ensembl.Panel.ModalContainer = Ensembl.Panel.ModalContainer.extend({
  hide: function () {
    this.base.apply(this, arguments);

    // updateConfiguration can cause a redirect from MultiSelector, destroying this.el, so check that this hasn't happened before continuing
    if (this.el && this.el.find('._needs_refresh_on_hide').removeClass('_needs_refresh_on_hide').length) {
      Ensembl.EventManager.trigger('refreshAccountsDropdown');
    }
  }
});
{'fraction_non_alphanumeric': 0.10366972477064221, 'fraction_numerical': 0.0, 'mean_word_length': 4.897297297297297, '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': '4663872', 'n_tokens_mistral': 306, 'n_tokens_neox': 298, 'n_words': 80}