diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index f90e1240..832353f9 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -18,6 +18,7 @@ class ItemsController < ApplicationController format.js { render :json => {:items => @items, :total_pages => @items.total_pages}, :callback => params[:callback] } end rescue Item::SearchError + @items = [] respond_to do |format| format.html { flash.now[:alert] = $!.message } format.json { render :json => {:error => $!.message} }