<commit_before>Dashboard.SearchTab = Ember.View.extend
  type: 'view'
  templateName: 'search-tab'
  routeName: ''
  tagName: ''

  routeParams: (->
    @get('controller.searchRouteParams')
  ).property('controller.searchRouteParams')

  hasSearch: (->
    hasSearch = false

    $.map @get('controller.search'), (value)=>
      if value != null
        hasSearch = true

    return hasSearch
  ).property('controller.search')<commit_msg>Fix hasSearch method, it wasn't working with sublevel of a object<commit_after>Dashboard.SearchTab = Ember.View.extend
  type: 'view'
  templateName: 'search-tab'
  routeName: ''
  tagName: ''

  routeParams: (->
    @get('controller.searchRouteParams')
  ).property('controller.searchRouteParams')

  hasSearch: (->
    hasValues = (values)->
      results = []

      $.map values, (value)=>
        if Ember.typeOf(value) == 'object'
          results.push hasValues(value)
        else if !Ember.empty(value)
          results.push true

      return [].concat.apply([], results)

    return $.inArray(true, hasValues(@get('controller.search'))) != -1
  ).property('controller.search')
{'fraction_non_alphanumeric': 0.15084294587400177, 'fraction_numerical': 0.0008873114463176575, 'mean_word_length': 3.3384615384615386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '969423', 'n_tokens_mistral': 351, 'n_tokens_neox': 342, 'n_words': 70}