Commit 04561011 authored by C. Morgan Hamill's avatar C. Morgan Hamill

Clean up conditional statement in `name` method.

Reverse the conditional order to avoid awkward `if !` construction.
parent a45f7262
...@@ -65,10 +65,10 @@ module Gitlab ...@@ -65,10 +65,10 @@ module Gitlab
end end
def name def name
if !auth.info.name.nil? if auth.info.name.nil?
auth.info.name.to_s.force_encoding('utf-8')
else
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8') "#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
else
auth.info.name.to_s.force_encoding('utf-8')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment