<div class='hero-unit'>
  <%= render :partial => 'ask'%>
</div>
<div class="container">
    <% if session[:categories].size > 0 %>
      <div class='alert-message info'>
        OK, I'm going to look for things related to 
        <%= @terms.map{|x| "<strong>#{h(x)}</strong>"}.join(' and ').html_safe %>
        that have <%= [@quantity].map{|x| "<strong>#{x.to_s}</strong>"}.join(' and ').html_safe %>
        as inputs.
      </div>
      <%= render :partial => 'thinking'%>
    <% else %>
      <%= render :partial => 'no_results'%>
    <% end %>
</div>
<div class='hero-unit'>
  <%= render :partial => 'ask'%>
</div>
<div class="container">
    <% if session[:categories] && session[:categories].size > 0 %>
      <div class='alert-message info'>
        OK, I'm going to look for things related to 
        <%= @terms.map{|x| "<strong>#{h(x)}</strong>"}.join(' and ').html_safe %>
        that have <%= [@quantity].map{|x| "<strong>#{x.to_s}</strong>"}.join(' and ').html_safe %>
        as inputs.
      </div>
      <%= render :partial => 'thinking'%>
    <% else %>
      <%= render :partial => 'no_results'%>
    <% end %>
</div>
Check categories list is set before trying to use it. APP-487
Check categories list is set before trying to use it. APP-487
