How do I clear the suggestions when the searchbar is empty?

I used this code so that before the user has typed in a query, nothing shows

searchFunction(helper) {
    if (helper.state.query === '') {
      $('#results-section').addClass('d-none');
    } else {
      $('#results-section').removeClass('d-none');
      helper.search();
    }
  },

But when I backspace until the search box is empty, the hits still show