diff options
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r-- | app/controllers/users_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 63eada2c968..96b5a8b8608 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -25,9 +25,7 @@ class UsersController < ApplicationController respond_to do |format| format.html { render 'show' } format.json do - render json: { - html: view_to_html_string("shared/groups/_list", groups: @groups) - } + render json: { html: @groups.blank? ? nil : view_to_html_string("shared/groups/_list", groups: @groups) } end end end |