Skip to content

Commit

Permalink
[webui] Remove unreachable code
Browse files Browse the repository at this point in the history
params[:size].to_i will always return a truthy value, so whatever comes
after is never reached.

Co-authored-by: Dany Marcoux <dmarcoux@suse.com>
  • Loading branch information
eduardoj and Dany Marcoux committed Jul 5, 2018
1 parent 529af29 commit ab947e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/controllers/webui/user_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def save_dialog
end

def icon
size = params[:size].to_i || '20'
size = params[:size].to_i
user = User.find_by_login(params[:user])
if user.nil? || (content = user.gravatar_image(size)) == :none
redirect_to ActionController::Base.helpers.asset_path('default_face.png')
Expand Down

0 comments on commit ab947e7

Please sign in to comment.